diff options
| author | Tomas Kulhanek <tomas.kulhanek@stfc.ac.uk> | 2018-12-17 11:54:19 +0000 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-17 11:54:19 +0000 | 
| commit | b3f8f97789426c1612609a9218f05eee2c86dc47 (patch) | |
| tree | 78a54a4ea7b65b2b9307d71ea2dc3ae2b0272992 | |
| parent | bdadc35c7e4a332bec3c87fcc62f4a169e839f2c (diff) | |
| download | regularization-b3f8f97789426c1612609a9218f05eee2c86dc47.tar.gz regularization-b3f8f97789426c1612609a9218f05eee2c86dc47.tar.bz2 regularization-b3f8f97789426c1612609a9218f05eee2c86dc47.tar.xz regularization-b3f8f97789426c1612609a9218f05eee2c86dc47.zip | |
UPDATE: return -1 in case of error
| -rw-r--r-- | Core/regularisers_GPU/PatchSelect_GPU_core.cu | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/Core/regularisers_GPU/PatchSelect_GPU_core.cu b/Core/regularisers_GPU/PatchSelect_GPU_core.cu index 74f59ca..d173124 100644 --- a/Core/regularisers_GPU/PatchSelect_GPU_core.cu +++ b/Core/regularisers_GPU/PatchSelect_GPU_core.cu @@ -397,7 +397,7 @@ extern "C" int PatchSelect_GPU_main(float *A, unsigned short *H_i, unsigned shor      cudaGetDeviceCount(&deviceCount);      if (deviceCount == 0) {          fprintf(stderr, "No CUDA devices found\n"); -        return; +        return -1;      }        int SearchW_full, SimilW_full, counterG, i, j; @@ -440,7 +440,7 @@ extern "C" int PatchSelect_GPU_main(float *A, unsigned short *H_i, unsigned shor      else if (SearchWindow == 13)  IndexSelect2D_13_kernel<<<dimGrid,dimBlock>>>(Ad, H_i_d, H_j_d, Weights_d, Eucl_Vec_d, N, M, SearchWindow, SearchW_full, SimilarWin, NumNeighb, h2);      else {      fprintf(stderr, "Select the searching window size from 5, 7, 9, 11 or 13\n"); -        return;}     +        return -1;}          checkCudaErrors(cudaPeekAtLastError() );              checkCudaErrors(cudaDeviceSynchronize());         /***************************************************************/     | 
