Selaa lähdekoodia

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."
Pierre Moreau 8 vuotta sitten
vanhempi
sitoutus
84f3c87b03
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 1
      Tests/Cuda/Complex/dynamic.cu
  2. 1 1
      Tests/Cuda/Complex/file3.cu

+ 1 - 1
Tests/Cuda/Complex/dynamic.cu

@@ -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;
     }

+ 1 - 1
Tests/Cuda/Complex/file3.cu

@@ -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;