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

Function FormattedNumber

tensorflow/lite/toco/tooling_util.cc:2028–2038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2026}
2027
2028string FormattedNumber(int64 x) {
2029 const int64 million = 1000000;
2030 const int64 billion = 1000000000;
2031 if (x < 10000) {
2032 return toco::port::StringF("%d ", x);
2033 } else if (x < billion) {
2034 return toco::port::StringF("%.3f M", static_cast<double>(x) / million);
2035 } else {
2036 return toco::port::StringF("%.3f G", static_cast<double>(x) / billion);
2037 }
2038}
2039
2040void GetShuffleShape(AxesOrder input_axes_order, AxesOrder output_axes_order,
2041 std::vector<int>* shuffle) {

Callers 3

GetOpAttributesFunction · 0.85
GetSubgraphLabelFunction · 0.85
GetGraphLabelFunction · 0.85

Calls 1

StringFFunction · 0.85

Tested by

no test coverage detected