diff --git a/samples/gpu/performance/performance.cpp b/samples/gpu/performance/performance.cpp index 035a12354..886c5e2f2 100644 --- a/samples/gpu/performance/performance.cpp +++ b/samples/gpu/performance/performance.cpp @@ -47,7 +47,7 @@ void TestSystem::run() cout << setiosflags(ios_base::fixed | ios_base::left); cout << "\nCPU Total: " << setprecision(3) << cpu_total_ / getTickFrequency() << " sec\n"; cout << "GPU Total: " << setprecision(3) << gpu_total_ / getTickFrequency() << " sec (x" - << setprecision(3) << (double)cpu_total_ / gpu_total_ << ")\n"; + << setprecision(3) << static_cast(cpu_total_) / gpu_total_ << ")\n"; cout << resetiosflags(ios_base::fixed | ios_base::left); } @@ -59,7 +59,7 @@ void TestSystem::flush() int cpu_time = static_cast(cpu_elapsed_ / getTickFrequency() * 1000.0); int gpu_time = static_cast(gpu_elapsed_ / getTickFrequency() * 1000.0); - double speedup = (double)cpu_time / gpu_time; + double speedup = static_cast(cpu_time) / gpu_time; cpu_elapsed_ = 0; gpu_elapsed_ = 0;