From a19fd6cff9716cba62576f84adf77892adbfd75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <klinkjak@fjfi.cvut.cz> Date: Thu, 10 Dec 2015 09:27:46 +0100 Subject: [PATCH] Fixed calculation of bandwidth (lpNorm is unary operation). --- tests/benchmarks/tnl-cuda-benchmarks.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/benchmarks/tnl-cuda-benchmarks.h b/tests/benchmarks/tnl-cuda-benchmarks.h index 17ae5c04b3..2c11b5bc76 100644 --- a/tests/benchmarks/tnl-cuda-benchmarks.h +++ b/tests/benchmarks/tnl-cuda-benchmarks.h @@ -156,7 +156,7 @@ int main( int argc, char* argv[] ) resultHost = hostVector.lpNorm( 2.0 ); timer.stop(); timeHost = timer.getTime(); - bandwidth = 2 * datasetSize / timer.getTime(); + bandwidth = datasetSize / timer.getTime(); cout << "bandwidth: " << bandwidth << " GB/sec, time: " << timer.getTime() << " sec." << endl; cout << "Benchmarking lpNorm on GPU: "; @@ -166,7 +166,7 @@ int main( int argc, char* argv[] ) resultDevice = deviceVector.lpNorm( 2.0 ); timer.stop(); timeDevice = timer.getTime(); - bandwidth = 2 * datasetSize / timer.getTime(); + bandwidth = datasetSize / timer.getTime(); cout << "bandwidth: " << bandwidth << " GB/sec, time: " << timer.getTime() << " sec." << endl; cout << "CPU/GPU speedup: " << timeHost / timeDevice << endl; -- GitLab