diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2021-11-16 14:07:55 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2021-11-16 14:07:55 +0100 |
commit | c6e203411abf3dad3e677aaa1186b927086f8ba7 (patch) | |
tree | 6c728e1125961fc04ba6f77bf9af637925825f5b /cuda/3d/fdk.cu | |
parent | 231dd3e5e28319aa16155efd9ec7fdc69834666b (diff) | |
parent | 39582115bc93b5435d25e56891815ae7cb1898fd (diff) | |
download | astra-c6e203411abf3dad3e677aaa1186b927086f8ba7.tar.gz astra-c6e203411abf3dad3e677aaa1186b927086f8ba7.tar.bz2 astra-c6e203411abf3dad3e677aaa1186b927086f8ba7.tar.xz astra-c6e203411abf3dad3e677aaa1186b927086f8ba7.zip |
Merge branch 'checkCuda'
This cleans up error logging and handling for cuda calls.
Diffstat (limited to 'cuda/3d/fdk.cu')
-rw-r--r-- | cuda/3d/fdk.cu | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cuda/3d/fdk.cu b/cuda/3d/fdk.cu index 7b36c93..0b8d2ab 100644 --- a/cuda/3d/fdk.cu +++ b/cuda/3d/fdk.cu @@ -176,7 +176,8 @@ bool FDK_PreWeight(cudaPitchedPtr D_projData, devFDK_preweight<<<dimGrid, dimBlock>>>(D_projData.ptr, projPitch, 0, dims.iProjAngles, fSrcOrigin, fDetOrigin, fZShift, fDetUSize, fDetVSize, dims); - cudaTextForceKernelsCompletion(); + if (!checkCuda(cudaThreadSynchronize(), "FDK_PreWeight")) + return false; if (bShortScan && dims.iProjAngles > 1) { ASTRA_DEBUG("Doing Parker weighting"); @@ -225,9 +226,10 @@ bool FDK_PreWeight(cudaPitchedPtr D_projData, devFDK_ParkerWeight<<<dimGrid, dimBlock>>>(D_projData.ptr, projPitch, 0, dims.iProjAngles, fSrcOrigin, fDetOrigin, fDetUSize, fCentralFanAngle, dims); + if (!checkCuda(cudaThreadSynchronize(), "FDK_PreWeight ParkerWeight")) + return false; } - cudaTextForceKernelsCompletion(); return true; } |