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

Function FormatNumber

tensorflow/core/profiler/internal/tfprof_utils.cc:32–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace tensorflow {
31namespace tfprof {
32string FormatNumber(int64 n) {
33 if (n < 1000) {
34 return strings::Printf("%lld", n);
35 } else if (n < 1000000) {
36 return strings::Printf("%.2fk", n / 1000.0);
37 } else if (n < 1000000000) {
38 return strings::Printf("%.2fm", n / 1000000.0);
39 } else {
40 return strings::Printf("%.2fb", n / 1000000000.0);
41 }
42}
43
44string FormatTime(int64 micros) {
45 if (micros < 1000) {

Callers 3

FormatNodeMethod · 0.85
FormatNodeMethod · 0.85
FormatNodeMethod · 0.85

Calls 1

PrintfFunction · 0.85

Tested by

no test coverage detected