summaryrefslogtreecommitdiffstats
path: root/Tests/Cuda
diff options
context:
space:
mode:
authorPierre Moreau <dev@pmoreau.org>2017-02-02 12:44:49 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-10 18:46:06 (GMT)
commit21a125cdbff24efa746249a3b8ccc6296c5f0aff (patch)
treef6722137ea5569c525d62377258887ecb224ca61 /Tests/Cuda
parenteebb2be8b0db17bb5f760e7fa04c020406e6f6eb (diff)
downloadCMake-21a125cdbff24efa746249a3b8ccc6296c5f0aff.zip
CMake-21a125cdbff24efa746249a3b8ccc6296c5f0aff.tar.gz
CMake-21a125cdbff24efa746249a3b8ccc6296c5f0aff.tar.bz2
Tests/Cuda: Print error message if mixed_kernel failed
Diffstat (limited to 'Tests/Cuda')
-rw-r--r--Tests/Cuda/Complex/mixed.cu7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/Cuda/Complex/mixed.cu b/Tests/Cuda/Complex/mixed.cu
index 7051de0..429f1f3 100644
--- a/Tests/Cuda/Complex/mixed.cu
+++ b/Tests/Cuda/Complex/mixed.cu
@@ -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;
}