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

Method Read

tensorflow/core/lib/io/table_test.cc:131–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 }
130
131 Status Read(uint64 offset, size_t n, StringPiece* result,
132 char* scratch) const override {
133 if (offset > contents_.size()) {
134 return errors::InvalidArgument("invalid Read offset");
135 }
136 if (offset + n > contents_.size()) {
137 n = contents_.size() - offset;
138 }
139 memcpy(scratch, &contents_[offset], n);
140 *result = StringPiece(scratch, n);
141 bytes_read_ += n;
142 return Status::OK();
143 }
144
145 uint64 BytesRead() const { return bytes_read_; }
146

Callers 7

OpenMethod · 0.45
FillBufferMethod · 0.45
ReadBlockFunction · 0.45
ReadNBytesMethod · 0.45
SkipNBytesMethod · 0.45
ReadFromFileMethod · 0.45
TestMultipleWritesFunction · 0.45

Calls 2

InvalidArgumentFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected