diff options
Diffstat (limited to 'cuda/2d/sirt.cu')
-rw-r--r-- | cuda/2d/sirt.cu | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cuda/2d/sirt.cu b/cuda/2d/sirt.cu index c402864..d34a180 100644 --- a/cuda/2d/sirt.cu +++ b/cuda/2d/sirt.cu @@ -191,11 +191,11 @@ bool SIRT::iterate(unsigned int iterations) for (unsigned int iter = 0; iter < iterations && !shouldAbort; ++iter) { // copy sinogram to projection data - cudaMemcpy2D(D_projData, sizeof(float)*projPitch, D_sinoData, sizeof(float)*sinoPitch, sizeof(float)*(dims.iProjDets), dims.iProjAngles, cudaMemcpyDeviceToDevice); + duplicateProjectionData(D_projData, D_sinoData, projPitch, dims); // do FP, subtracting projection from sinogram if (useVolumeMask) { - cudaMemcpy2D(D_tmpData, sizeof(float)*tmpPitch, D_volumeData, sizeof(float)*volumePitch, sizeof(float)*(dims.iVolWidth), dims.iVolHeight, cudaMemcpyDeviceToDevice); + duplicateVolumeData(D_tmpData, D_volumeData, volumePitch, dims); processVol<opMul>(D_tmpData, D_maskData, tmpPitch, dims); callFP(D_tmpData, tmpPitch, D_projData, projPitch, -1.0f); } else { @@ -226,11 +226,11 @@ bool SIRT::iterate(unsigned int iterations) float SIRT::computeDiffNorm() { // copy sinogram to projection data - cudaMemcpy2D(D_projData, sizeof(float)*projPitch, D_sinoData, sizeof(float)*sinoPitch, sizeof(float)*(dims.iProjDets), dims.iProjAngles, cudaMemcpyDeviceToDevice); + duplicateProjectionData(D_projData, D_sinoData, projPitch, dims); // do FP, subtracting projection from sinogram if (useVolumeMask) { - cudaMemcpy2D(D_tmpData, sizeof(float)*tmpPitch, D_volumeData, sizeof(float)*volumePitch, sizeof(float)*(dims.iVolWidth), dims.iVolHeight, cudaMemcpyDeviceToDevice); + duplicateVolumeData(D_tmpData, D_volumeData, volumePitch, dims); processVol<opMul>(D_tmpData, D_maskData, tmpPitch, dims); callFP(D_tmpData, tmpPitch, D_projData, projPitch, -1.0f); } else { |