MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ReadNBytes

Method ReadNBytes

tensorflow/core/lib/io/inputbuffer.cc:74–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74Status InputBuffer::ReadNBytes(int64 bytes_to_read, string* result) {
75 result->clear();
76 if (bytes_to_read < 0) {
77 return errors::InvalidArgument("Can't read a negative number of bytes: ",
78 bytes_to_read);
79 }
80 result->resize(bytes_to_read);
81 size_t bytes_read = 0;
82 Status status = ReadNBytes(bytes_to_read, &(*result)[0], &bytes_read);
83 if (bytes_read < bytes_to_read) result->resize(bytes_read);
84 return status;
85}
86
87Status InputBuffer::ReadNBytes(int64 bytes_to_read, char* result,
88 size_t* bytes_read) {

Callers 15

ReadHeaderMethod · 0.45
ReadRecordMethod · 0.45
ReadStringMethod · 0.45
ReadUInt32Method · 0.45
ReadVIntMethod · 0.45
TESTFunction · 0.45
TestAllCombinationsFunction · 0.45
TestMultipleWritesFunction · 0.45
TESTFunction · 0.45
TestTellFunction · 0.45
TestSkipNBytesFunction · 0.45

Calls 3

InvalidArgumentFunction · 0.85
clearMethod · 0.45
resizeMethod · 0.45

Tested by 10

TESTFunction · 0.36
TestAllCombinationsFunction · 0.36
TestMultipleWritesFunction · 0.36
TESTFunction · 0.36
TestTellFunction · 0.36
TestSkipNBytesFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36