MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / formatByteSize

Function formatByteSize

Source/Falcor/Utils/StringUtils.cpp:227–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227std::string formatByteSize(size_t size)
228{
229 if (size < 1024ull)
230 return fmt::format("{} B", size);
231 else if (size < 1048576ull)
232 return fmt::format("{:.2f} kB", size / 1024.0);
233 else if (size < 1073741824ull)
234 return fmt::format("{:.2f} MB", size / 1048576.0);
235 else if (size < 1099511627776ull)
236 return fmt::format("{:.2f} GB", size / 1073741824.0);
237 else
238 return fmt::format("{:.2f} TB", size / 1099511627776.0);
239}
240
241std::string encodeBase64(const void* data, size_t len)
242{

Callers 4

renderUIMethod · 0.85
buildBlasMethod · 0.85
renderUIMethod · 0.85
CPU_TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

CPU_TESTFunction · 0.68