Tests/Cuda: Print error message if mixed_kernel failed

This commit is contained in:
Pierre Moreau
2017-02-02 13:44:49 +01:00
committed by Brad King
parent eebb2be8b0
commit 21a125cdbf

View File

@@ -31,5 +31,12 @@ EXPORT int mixed_launch_kernel(int x)
result_type r;
mixed_kernel <<<1,1>>> (r,x);
cudaError_t err = cudaGetLastError();
if(err != cudaSuccess)
{
std::cerr << "mixed_kernel [SYNC] failed: "
<< cudaGetErrorString(err) << std::endl;
return x;
}
return r.sum;
}