From e0b3ad8e57f269e34085ba319aa399ee3476811a Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 16 Apr 2014 11:13:46 +0000 Subject: Replace direct cudaMemcpy2D calls by utility functions --- cuda/2d/em.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cuda/2d/em.cu') diff --git a/cuda/2d/em.cu b/cuda/2d/em.cu index c75f250..ebb76b5 100644 --- a/cuda/2d/em.cu +++ b/cuda/2d/em.cu @@ -150,11 +150,11 @@ bool EM::iterate(unsigned int iterations) float EM::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, sinoPitch, 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(D_tmpData, D_maskData, tmpPitch, dims); callFP(D_tmpData, tmpPitch, D_projData, projPitch, -1.0f); } else { -- cgit v1.2.3