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

Function FindShortSuccessor

tensorflow/core/lib/io/table_builder.cc:55–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void FindShortSuccessor(string* key) {
56 // Find first character that can be incremented
57 size_t n = key->size();
58 for (size_t i = 0; i < n; i++) {
59 const uint8 byte = (*key)[i];
60 if (byte != static_cast<uint8>(0xff)) {
61 (*key)[i] = byte + 1;
62 key->resize(i + 1);
63 return;
64 }
65 }
66 // *key is a run of 0xffs. Leave it alone.
67}
68} // namespace
69
70struct TableBuilder::Rep {

Callers 1

FinishMethod · 0.85

Calls 2

sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected