MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / GetChunkName

Function GetChunkName

oneflow/core/embedding/persistent_table.cpp:87–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87std::string GetChunkName(uint64_t chunk_id) {
88 const std::string chunk_name_wo_leading_zero = std::to_string(chunk_id);
89 CHECK_LE(chunk_name_wo_leading_zero.size(), kChunkNameSuffixLength);
90 return std::string(kChunkNameSuffixLength - chunk_name_wo_leading_zero.size(), '0')
91 + chunk_name_wo_leading_zero;
92}
93
94uint64_t GetChunkId(const std::string& chunk_name) {
95 size_t pos = 0;

Callers 4

KeyFilePathMethod · 0.85
ValueFilePathMethod · 0.85
IndexFilePathMethod · 0.85
SaveSnapshotImplMethod · 0.85

Calls 2

to_stringFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected