Skip to content
Snippets Groups Projects
Commit 84f3c87b authored by Pierre Moreau's avatar Pierre Moreau Committed by Brad King
Browse files

Tests/Cuda: Print error message if an error occurred

Fixes c59811a2 "CUDA: Tests now state why they are failing when no CUDA card is found."
parent ee3295e9
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ EXPORT void cuda_dynamic_lib_func()
{
DetermineIfValidCudaDevice <<<1,1>>> ();
cudaError_t err = cudaGetLastError();
if(err == cudaSuccess)
if(err != cudaSuccess)
{
std::cerr << cudaGetErrorString(err) << std::endl;
}
......
......@@ -20,7 +20,7 @@ int file3_launch_kernel(int x)
result_type r;
file3_kernel <<<1,1>>> (r,x);
cudaError_t err = cudaGetLastError();
if(err == cudaSuccess)
if(err != cudaSuccess)
{
std::cerr << cudaGetErrorString(err) << std::endl;
return x;
......
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