cout << setiosflags(ios_base::fixed | ios_base::left);\r
cout << "\nCPU Total: " << setprecision(3) << cpu_total_ / getTickFrequency() << " sec\n";\r
cout << "GPU Total: " << setprecision(3) << gpu_total_ / getTickFrequency() << " sec (x" \r
- << setprecision(3) << (double)cpu_total_ / gpu_total_ << ")\n";\r
+ << setprecision(3) << static_cast<double>(cpu_total_) / gpu_total_ << ")\n";\r
cout << resetiosflags(ios_base::fixed | ios_base::left);\r
}\r
\r
\r
int cpu_time = static_cast<int>(cpu_elapsed_ / getTickFrequency() * 1000.0);\r
int gpu_time = static_cast<int>(gpu_elapsed_ / getTickFrequency() * 1000.0);\r
- double speedup = (double)cpu_time / gpu_time;\r
+ double speedup = static_cast<double>(cpu_time) / gpu_time;\r
\r
cpu_elapsed_ = 0;\r
gpu_elapsed_ = 0;\r