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

Method ReadVarint64

tensorflow/core/lib/io/inputbuffer.h:125–136  ·  view source on GitHub ↗

Inlined for performance.

Source from the content-addressed store, hash-verified

123
124// Inlined for performance.
125inline Status InputBuffer::ReadVarint64(uint64* result) {
126 if (pos_ + core::kMaxVarint64Bytes <= limit_) {
127 // Fast path: directly parse from buffered data.
128 // Reads strictly from the range [pos_, limit_).
129 const char* offset = core::GetVarint64Ptr(pos_, limit_, result);
130 if (offset == nullptr) return errors::OutOfRange("Parsed past limit.");
131 pos_ = const_cast<char*>(offset);
132 return Status::OK();
133 } else {
134 return ReadVarint64Fallback(result);
135 }
136}
137
138} // namespace io
139} // namespace tensorflow

Callers 8

TESTFunction · 0.80
SkipValueMethod · 0.80
ReadVarintSizeAsIntFunction · 0.80
ParseFastMethod · 0.80
ParseInt64ListMethod · 0.80
ParseInt64FeatureFunction · 0.80
ReadStringTensorFunction · 0.80
ReadVariantTensorFunction · 0.80

Calls 1

GetVarint64PtrFunction · 0.85

Tested by 1

TESTFunction · 0.64