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

Function FastInt32ToBufferLeft

tensorflow/core/lib/strings/numbers.cc:131–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129namespace strings {
130
131size_t FastInt32ToBufferLeft(int32 i, char* buffer) {
132 uint32 u = i;
133 size_t length = 0;
134 if (i < 0) {
135 *buffer++ = '-';
136 ++length;
137 // We need to do the negation in modular (i.e., "unsigned")
138 // arithmetic; MSVC++ apparently warns for plain "-u", so
139 // we write the equivalent expression "0 - u" instead.
140 u = 0 - u;
141 }
142 length += FastUInt32ToBufferLeft(u, buffer);
143 return length;
144}
145
146size_t FastUInt32ToBufferLeft(uint32 i, char* buffer) {
147 char* start = buffer;

Callers 1

AlphaNumMethod · 0.70

Calls 1

FastUInt32ToBufferLeftFunction · 0.70

Tested by

no test coverage detected