summaryrefslogtreecommitdiffstats
path: root/cuda/2d/fft.cu
diff options
context:
space:
mode:
authorDaniel M. Pelt <D.M.Pelt@cwi.nl>2015-03-13 12:18:21 +0100
committerDaniel M. Pelt <D.M.Pelt@cwi.nl>2015-03-13 12:18:21 +0100
commitc5507b6ef2abfab169150528a374526bb348bf62 (patch)
tree2e218781b8c90209f7ac53219cc59d3319fe3a73 /cuda/2d/fft.cu
parent150951875c236f95a64fd132c26576bd19daca80 (diff)
downloadastra-c5507b6ef2abfab169150528a374526bb348bf62.tar.gz
astra-c5507b6ef2abfab169150528a374526bb348bf62.tar.bz2
astra-c5507b6ef2abfab169150528a374526bb348bf62.tar.xz
astra-c5507b6ef2abfab169150528a374526bb348bf62.zip
Adds ASTRA_*** defines for easier logging, and changes internal calls to these defines
Diffstat (limited to 'cuda/2d/fft.cu')
-rw-r--r--cuda/2d/fft.cu24
1 files changed, 12 insertions, 12 deletions
diff --git a/cuda/2d/fft.cu b/cuda/2d/fft.cu
index 468c7c2..49c696c 100644
--- a/cuda/2d/fft.cu
+++ b/cuda/2d/fft.cu
@@ -43,7 +43,7 @@ using namespace astra;
#define CHECK_ERROR(errorMessage) do { \
cudaError_t err = cudaThreadSynchronize(); \
if( cudaSuccess != err) { \
- astra::CLogger::error(__FILE__,__LINE__,"Cuda error %s : %s", \
+ ASTRA_ERROR("Cuda error %s : %s", \
errorMessage,cudaGetErrorString( err)); \
exit(EXIT_FAILURE); \
} } while (0)
@@ -51,13 +51,13 @@ using namespace astra;
#define SAFE_CALL( call) do { \
cudaError err = call; \
if( cudaSuccess != err) { \
- astra::CLogger::error(__FILE__,__LINE__,"Cuda error: %s ", \
+ ASTRA_ERROR("Cuda error: %s ", \
cudaGetErrorString( err)); \
exit(EXIT_FAILURE); \
} \
err = cudaThreadSynchronize(); \
if( cudaSuccess != err) { \
- astra::CLogger::error(__FILE__,__LINE__,"Cuda error: %s : ", \
+ ASTRA_ERROR("Cuda error: %s : ", \
cudaGetErrorString( err)); \
exit(EXIT_FAILURE); \
} } while (0)
@@ -137,7 +137,7 @@ static bool invokeCudaFFT(int _iProjectionCount, int _iDetectorCount,
result = cufftPlan1d(&plan, _iDetectorCount, CUFFT_R2C, _iProjectionCount);
if(result != CUFFT_SUCCESS)
{
- astra::CLogger::error(__FILE__,__LINE__,"Failed to plan 1d r2c fft");
+ ASTRA_ERROR("Failed to plan 1d r2c fft");
return false;
}
@@ -146,7 +146,7 @@ static bool invokeCudaFFT(int _iProjectionCount, int _iDetectorCount,
if(result != CUFFT_SUCCESS)
{
- astra::CLogger::error(__FILE__,__LINE__,"Failed to exec 1d r2c fft");
+ ASTRA_ERROR("Failed to exec 1d r2c fft");
return false;
}
@@ -163,7 +163,7 @@ static bool invokeCudaIFFT(int _iProjectionCount, int _iDetectorCount,
result = cufftPlan1d(&plan, _iDetectorCount, CUFFT_C2R, _iProjectionCount);
if(result != CUFFT_SUCCESS)
{
- astra::CLogger::error(__FILE__,__LINE__,"Failed to plan 1d c2r fft");
+ ASTRA_ERROR("Failed to plan 1d c2r fft");
return false;
}
@@ -174,7 +174,7 @@ static bool invokeCudaIFFT(int _iProjectionCount, int _iDetectorCount,
if(result != CUFFT_SUCCESS)
{
- astra::CLogger::error(__FILE__,__LINE__,"Failed to exec 1d c2r fft");
+ ASTRA_ERROR("Failed to exec 1d c2r fft");
return false;
}
@@ -630,7 +630,7 @@ void genFilter(E_FBPFILTER _eFilter, float _fD, int _iProjectionCount,
}
default:
{
- astra::CLogger::error(__FILE__,__LINE__,"Cannot serve requested filter");
+ ASTRA_ERROR("Cannot serve requested filter");
}
}
@@ -764,13 +764,13 @@ void testCudaFFT()
result = cufftPlan1d(&plan, iDetectorCount, CUFFT_R2C, iProjectionCount);
if(result != CUFFT_SUCCESS)
{
- astra::CLogger::error(__FILE__,__LINE__,"Failed to plan 1d r2c fft");
+ ASTRA_ERROR("Failed to plan 1d r2c fft");
}
result = cufftExecR2C(plan, pfDevProj, pDevFourProj);
if(result != CUFFT_SUCCESS)
{
- astra::CLogger::error(__FILE__,__LINE__,"Failed to exec 1d r2c fft");
+ ASTRA_ERROR("Failed to exec 1d r2c fft");
}
cufftDestroy(plan);
@@ -794,13 +794,13 @@ void testCudaFFT()
result = cufftPlan1d(&plan, iDetectorCount, CUFFT_C2R, iProjectionCount);
if(result != CUFFT_SUCCESS)
{
- astra::CLogger::error(__FILE__,__LINE__,"Failed to plan 1d c2r fft");
+ ASTRA_ERROR("Failed to plan 1d c2r fft");
}
result = cufftExecC2R(plan, pDevFourProj, pfDevInFourProj);
if(result != CUFFT_SUCCESS)
{
- astra::CLogger::error(__FILE__,__LINE__,"Failed to exec 1d c2r fft");
+ ASTRA_ERROR("Failed to exec 1d c2r fft");
}
cufftDestroy(plan);