Skip to content
Snippets Groups Projects
Commit a19fd6cf authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed calculation of bandwidth (lpNorm is unary operation).

parent fb1474d3
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment