diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-01-09 14:09:40 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-01-09 14:09:40 +0100 |
commit | de27e439a0c59fade175fba4e0b4a1e0c84b933d (patch) | |
tree | 8d724e10b35291f5bfd63174eeeca95e52a863df /cuda/3d | |
parent | 324611ce98a82944def875e61cb93dd98ced9c79 (diff) | |
parent | 84da1d5e27abadf28e97695e88494c58bf1c2697 (diff) | |
download | astra-de27e439a0c59fade175fba4e0b4a1e0c84b933d.tar.gz astra-de27e439a0c59fade175fba4e0b4a1e0c84b933d.tar.bz2 astra-de27e439a0c59fade175fba4e0b4a1e0c84b933d.tar.xz astra-de27e439a0c59fade175fba4e0b4a1e0c84b933d.zip |
Merge branch 'parallel_vec'
Diffstat (limited to 'cuda/3d')
-rw-r--r-- | cuda/3d/fdk.cu | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cuda/3d/fdk.cu b/cuda/3d/fdk.cu index 27357ad..91b0219 100644 --- a/cuda/3d/fdk.cu +++ b/cuda/3d/fdk.cu @@ -233,7 +233,7 @@ bool FDK_Filter(cudaPitchedPtr D_projData, // The filtering is a regular ramp filter per detector line. int iPaddedDetCount = calcNextPowerOfTwo(2 * dims.iProjU); - int iHalfFFTSize = calcFFTFourSize(iPaddedDetCount); + int iHalfFFTSize = astraCUDA::calcFFTFourierSize(iPaddedDetCount); int projPitch = D_projData.pitch/sizeof(float); @@ -241,22 +241,22 @@ bool FDK_Filter(cudaPitchedPtr D_projData, float* D_sinoData = (float*)D_projData.ptr; cufftComplex * D_sinoFFT = NULL; - allocateComplexOnDevice(dims.iProjAngles, iHalfFFTSize, &D_sinoFFT); + astraCUDA::allocateComplexOnDevice(dims.iProjAngles, iHalfFFTSize, &D_sinoFFT); bool ok = true; for (int v = 0; v < dims.iProjV; ++v) { - ok = runCudaFFT(dims.iProjAngles, D_sinoData, projPitch, + ok = astraCUDA::runCudaFFT(dims.iProjAngles, D_sinoData, projPitch, dims.iProjU, iPaddedDetCount, iHalfFFTSize, D_sinoFFT); if (!ok) break; - applyFilter(dims.iProjAngles, iHalfFFTSize, D_sinoFFT, D_filter); + astraCUDA::applyFilter(dims.iProjAngles, iHalfFFTSize, D_sinoFFT, D_filter); - ok = runCudaIFFT(dims.iProjAngles, D_sinoFFT, D_sinoData, projPitch, + ok = astraCUDA::runCudaIFFT(dims.iProjAngles, D_sinoFFT, D_sinoData, projPitch, dims.iProjU, iPaddedDetCount, iHalfFFTSize); if (!ok) break; @@ -264,7 +264,7 @@ bool FDK_Filter(cudaPitchedPtr D_projData, D_sinoData += (dims.iProjAngles * projPitch); } - freeComplexOnDevice(D_sinoFFT); + astraCUDA::freeComplexOnDevice(D_sinoFFT); return ok; } @@ -281,7 +281,7 @@ bool FDK(cudaPitchedPtr D_volumeData, // TODO: Check errors cufftComplex * D_filter; int iPaddedDetCount = calcNextPowerOfTwo(2 * dims.iProjU); - int iHalfFFTSize = calcFFTFourSize(iPaddedDetCount); + int iHalfFFTSize = astraCUDA::calcFFTFourierSize(iPaddedDetCount); // NB: We don't support arbitrary cone_vec geometries here. @@ -326,7 +326,7 @@ bool FDK(cudaPitchedPtr D_volumeData, memset(pHostFilter, 0, sizeof(cufftComplex) * dims.iProjAngles * iHalfFFTSize); if (pfFilter == 0){ - genFilter(FILTER_RAMLAK, 1.0f, dims.iProjAngles, pHostFilter, iPaddedDetCount, iHalfFFTSize); + astraCUDA::genFilter(astra::FILTER_RAMLAK, 1.0f, dims.iProjAngles, pHostFilter, iPaddedDetCount, iHalfFFTSize); } else { for (int i = 0; i < dims.iProjAngles * iHalfFFTSize; i++) { pHostFilter[i].x = pfFilter[i]; @@ -335,8 +335,8 @@ bool FDK(cudaPitchedPtr D_volumeData, } - allocateComplexOnDevice(dims.iProjAngles, iHalfFFTSize, &D_filter); - uploadComplexArrayToDevice(dims.iProjAngles, iHalfFFTSize, pHostFilter, D_filter); + astraCUDA::allocateComplexOnDevice(dims.iProjAngles, iHalfFFTSize, &D_filter); + astraCUDA::uploadComplexArrayToDevice(dims.iProjAngles, iHalfFFTSize, pHostFilter, D_filter); delete [] pHostFilter; @@ -348,7 +348,7 @@ bool FDK(cudaPitchedPtr D_volumeData, ok = FDK_Filter(D_projData, D_filter, dims); // Clean up filter - freeComplexOnDevice(D_filter); + astraCUDA::freeComplexOnDevice(D_filter); #endif if (!ok) |