From bcff7884bb89dbecd394c75a8f57b0a54a743b52 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 16 Apr 2014 11:13:33 +0000 Subject: Change allocate/zeroVolume to volume/sinogram-specific variants --- cuda/2d/util.cu | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'cuda/2d/util.cu') diff --git a/cuda/2d/util.cu b/cuda/2d/util.cu index 8bb2f2f..d5cbe44 100644 --- a/cuda/2d/util.cu +++ b/cuda/2d/util.cu @@ -97,6 +97,30 @@ void zeroVolume(float* data, unsigned int pitch, unsigned int width, unsigned in ASTRA_CUDA_ASSERT(err); } +bool allocateVolumeData(float*& D_ptr, unsigned int& pitch, const SDimensions& dims) +{ + // TODO: memory order + return allocateVolume(D_ptr, dims.iVolWidth, dims.iVolHeight, pitch); +} + +bool allocateProjectionData(float*& D_ptr, unsigned int& pitch, const SDimensions& dims) +{ + // TODO: memory order + return allocateVolume(D_ptr, dims.iProjDets, dims.iProjAngles, pitch); +} + +void zeroVolumeData(float* D_ptr, unsigned int pitch, const SDimensions& dims) +{ + // TODO: memory order + zeroVolume(D_ptr, pitch, dims.iVolWidth, dims.iVolHeight); +} + +void zeroProjectionData(float* D_ptr, unsigned int pitch, const SDimensions& dims) +{ + // TODO: memory order + zeroVolume(D_ptr, pitch, dims.iProjDets, dims.iProjAngles); +} + template __global__ void reduce1D(float *g_idata, float *g_odata, unsigned int n) -- cgit v1.2.3