From 3a6769465bee7d56d0ddff36613b886446421e07 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 16 Apr 2014 11:12:55 +0000 Subject: Remove padding in 2D cuda in favour of Border mode --- cuda/2d/dataop.cu | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'cuda/2d/dataop.cu') diff --git a/cuda/2d/dataop.cu b/cuda/2d/dataop.cu index 68573b2..9dc193e 100644 --- a/cuda/2d/dataop.cu +++ b/cuda/2d/dataop.cu @@ -39,10 +39,10 @@ void operationVolumeMult(float* data1, float* data2, unsigned int width, unsigne float* D_data2; unsigned int pitch; - allocateVolume(D_data1, width+2, height+2, pitch); + allocateVolume(D_data1, width, height, pitch); copyVolumeToDevice(data1, width, width, height, D_data1, pitch); - allocateVolume(D_data2, width+2, height+2, pitch); + allocateVolume(D_data2, width, height, pitch); copyVolumeToDevice(data2, width, width, height, D_data2, pitch); processVol(D_data1, D_data2, pitch, width, height); @@ -59,10 +59,10 @@ void operationVolumeMultScalarMask(float* data, float* mask, float scalar, unsig float* D_mask; unsigned int pitch; - allocateVolume(D_data, width+2, height+2, pitch); + allocateVolume(D_data, width, height, pitch); copyVolumeToDevice(data, width, width, height, D_data, pitch); - allocateVolume(D_mask, width+2, height+2, pitch); + allocateVolume(D_mask, width, height, pitch); copyVolumeToDevice(mask, width, width, height, D_mask, pitch); processVol(D_data, D_mask, scalar, pitch, width, height); @@ -79,7 +79,7 @@ void operationVolumeMultScalar(float* data, float scalar, unsigned int width, un float* D_data; unsigned int pitch; - allocateVolume(D_data, width+2, height+2, pitch); + allocateVolume(D_data, width, height, pitch); copyVolumeToDevice(data, width, width, height, D_data, pitch); processVol(D_data, scalar, pitch, width, height); @@ -96,10 +96,10 @@ void operationVolumeAdd(float* data1, float* data2, unsigned int width, unsigned float* D_data2; unsigned int pitch; - allocateVolume(D_data1, width+2, height+2, pitch); + allocateVolume(D_data1, width, height, pitch); copyVolumeToDevice(data1, width, width, height, D_data1, pitch); - allocateVolume(D_data2, width+2, height+2, pitch); + allocateVolume(D_data2, width, height, pitch); copyVolumeToDevice(data2, width, width, height, D_data2, pitch); processVol(D_data1, D_data2, pitch, width, height); @@ -116,7 +116,7 @@ void operationVolumeAddScalar(float* data, float scalar, unsigned int width, uns float* D_data; unsigned int pitch; - allocateVolume(D_data, width+2, height+2, pitch); + allocateVolume(D_data, width, height, pitch); copyVolumeToDevice(data, width, width, height, D_data, pitch); processVol(D_data, scalar, pitch, width, height); -- cgit v1.2.3