From b9ed1489faf345c042df166760d8239da8bfd74a Mon Sep 17 00:00:00 2001 From: Alexey Spizhevoy Date: Mon, 24 Jan 2011 10:39:28 +0000 Subject: [PATCH] minor refactoring of gpu perf. tests --- samples/gpu/performance/performance.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;