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

Function EncodeVarint64

tensorflow/core/lib/core/coding.cc:110–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110char* EncodeVarint64(char* dst, uint64 v) {
111 static const int B = 128;
112 unsigned char* ptr = reinterpret_cast<unsigned char*>(dst);
113 while (v >= B) {
114 *(ptr++) = (v & (B - 1)) | B;
115 v >>= 7;
116 }
117 *(ptr++) = static_cast<unsigned char>(v);
118 return reinterpret_cast<char*>(ptr);
119}
120
121void PutVarint64(string* dst, uint64 v) {
122 char buf[10];

Callers 4

EncodePyBytesArrayFunction · 0.85
PutVarint64Function · 0.85
Encode64Method · 0.85
TF_StringEncodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected