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

Optimized error checking in tnl-cuda-benchmarks

parent 4bfcb781
No related branches found
No related tags found
No related merge requests found
......@@ -230,10 +230,13 @@ int main( int argc, char* argv[] )
cout << "bandwidth: " << bandwidth << " GB/sec, time: " << timer.getTime() << " sec." << endl;
cout << "CPU/GPU speedup: " << timeHost / timeDevice << endl;
HostVector auxHostVector;
auxHostVector.setLike( deviceVector );
auxHostVector = deviceVector;
for( int i = 0; i < size; i++ )
if( hostVector.getElement( i ) != deviceVector.getElement( i ) )
if( hostVector.getElement( i ) != auxHostVector.getElement( i ) )
{
cerr << "Error in prefix sum at position " << i << ": " << hostVector.getElement( i ) << " != " << deviceVector.getElement( i ) << endl;
cerr << "Error in prefix sum at position " << i << ": " << hostVector.getElement( i ) << " != " << auxHostVector.getElement( i ) << 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