summaryrefslogtreecommitdiffstats
path: root/cuda/2d/util.cu
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <WillemJan.Palenstijn@uantwerpen.be>2014-04-16 11:13:33 +0000
committerwpalenst <WillemJan.Palenstijn@uantwerpen.be>2014-04-16 11:13:33 +0000
commitbcff7884bb89dbecd394c75a8f57b0a54a743b52 (patch)
tree7b1d52bdb9dea23fb5c2dcacf3e6b179786ad26b /cuda/2d/util.cu
parent959f476f456b147999649ec3a8cca10017b2ad6c (diff)
downloadastra-bcff7884bb89dbecd394c75a8f57b0a54a743b52.tar.gz
astra-bcff7884bb89dbecd394c75a8f57b0a54a743b52.tar.bz2
astra-bcff7884bb89dbecd394c75a8f57b0a54a743b52.tar.xz
astra-bcff7884bb89dbecd394c75a8f57b0a54a743b52.zip
Change allocate/zeroVolume to volume/sinogram-specific variants
Diffstat (limited to 'cuda/2d/util.cu')
-rw-r--r--cuda/2d/util.cu24
1 files changed, 24 insertions, 0 deletions
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 <unsigned int blockSize>
__global__ void reduce1D(float *g_idata, float *g_odata, unsigned int n)