提交 cd826f76 编写于 作者: A Andrew Harp 提交者: TensorFlower Gardener

Remove std:: from std::round() calls in benchmark_model.cc to avoid issue in...

Remove std:: from std::round() calls in benchmark_model.cc to avoid issue in Android ndk where std::round is not found: https://code.google.com/p/android/issues/detail?id=54418
Change: 144137666
上级 15941d28
......@@ -430,11 +430,11 @@ int Main(int argc, char** argv) {
const float rounded_flops = (total_flops / 1000.0f);
pretty_flops = strings::StrCat(rounded_flops, "k FLOPs");
} else if (total_flops < (1000 * 1000 * 1000)) {
const float rounded_flops = (std::round(total_flops / 1000.0f) / 1000.0f);
const float rounded_flops = round(total_flops / 1000.0f) / 1000.0f;
pretty_flops = strings::StrCat(rounded_flops, " million FLOPs");
} else {
const float rounded_flops =
(std::round(total_flops / (1000.0f * 1000.0f)) / 1000.0f);
round(total_flops / (1000.0f * 1000.0f)) / 1000.0f;
pretty_flops = strings::StrCat(rounded_flops, " billion FLOPs");
}
LOG(INFO) << "FLOPs estimate: " << strings::HumanReadableNum(total_flops);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册