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/2d/fan_fp.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/2d/fan_fp.cu')
-rw-r--r-- | cuda/2d/fan_fp.cu | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cuda/2d/fan_fp.cu b/cuda/2d/fan_fp.cu index 9bbb401..342ca4c 100644 --- a/cuda/2d/fan_fp.cu +++ b/cuda/2d/fan_fp.cu @@ -268,16 +268,17 @@ bool FanFP_internal(float* D_volumeData, unsigned int volumePitch, for (unsigned int i = 0; i < dims.iVolHeight; i += g_blockSlices) FanFPvertical<<<dimGrid, dimBlock, 0, stream2>>>(D_projData, projPitch, i, blockStart, blockEnd, dims, outputScale); - cudaStreamDestroy(stream1); - cudaStreamDestroy(stream2); + bool ok = true; - cudaThreadSynchronize(); + ok &= checkCuda(cudaStreamSynchronize(stream1), "fan_fp hor"); + cudaStreamDestroy(stream1); - cudaTextForceKernelsCompletion(); + ok &= checkCuda(cudaStreamSynchronize(stream2), "fan_fp ver"); + cudaStreamDestroy(stream2); cudaFreeArray(D_dataArray); - return true; + return ok; } bool FanFP(float* D_volumeData, unsigned int volumePitch, |