summaryrefslogtreecommitdiffstats
path: root/cuda/2d
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2021-11-16 11:38:02 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2021-11-16 14:06:29 +0100
commit1875e824a0358a7e7510b31f5e87708b304652bc (patch)
treef84269a4d7a5e4c6b54a76a89eb78fae694932fe /cuda/2d
parentd59619737b79ca3bd732fedaff6665e600ee1335 (diff)
downloadastra-1875e824a0358a7e7510b31f5e87708b304652bc.tar.gz
astra-1875e824a0358a7e7510b31f5e87708b304652bc.tar.bz2
astra-1875e824a0358a7e7510b31f5e87708b304652bc.tar.xz
astra-1875e824a0358a7e7510b31f5e87708b304652bc.zip
Remove reportCudaError function
Diffstat (limited to 'cuda/2d')
-rw-r--r--cuda/2d/util.cu10
1 files changed, 1 insertions, 9 deletions
diff --git a/cuda/2d/util.cu b/cuda/2d/util.cu
index ce652cb..1c7f6f0 100644
--- a/cuda/2d/util.cu
+++ b/cuda/2d/util.cu
@@ -90,9 +90,7 @@ bool copySinogramToDevice(const float* in_data, unsigned int in_pitch,
bool allocateVolume(float*& ptr, unsigned int width, unsigned int height, unsigned int& pitch)
{
size_t p;
- cudaError_t ret = cudaMallocPitch((void**)&ptr, &p, sizeof(float)*width, height);
- if (ret != cudaSuccess) {
- reportCudaError(ret);
+ if (!checkCuda(cudaMallocPitch((void**)&ptr, &p, sizeof(float)*width, height), "allocateVolume")) {
ASTRA_ERROR("Failed to allocate %dx%d GPU buffer", width, height);
return false;
}
@@ -268,12 +266,6 @@ bool cudaTextForceKernelsCompletion()
return true;
}
-void reportCudaError(cudaError_t err)
-{
- if(err != cudaSuccess)
- ASTRA_ERROR("CUDA error %d: %s.", err, cudaGetErrorString(err));
-}
-
bool checkCuda(cudaError_t err, const char *msg)
{
if (err != cudaSuccess) {