summaryrefslogtreecommitdiffstats
path: root/cuda/2d/cgls.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/cgls.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/cgls.cu')
-rw-r--r--cuda/2d/cgls.cu14
1 files changed, 7 insertions, 7 deletions
diff --git a/cuda/2d/cgls.cu b/cuda/2d/cgls.cu
index df8db0b..f4175e1 100644
--- a/cuda/2d/cgls.cu
+++ b/cuda/2d/cgls.cu
@@ -73,16 +73,16 @@ void CGLS::reset()
bool CGLS::init()
{
// Lifetime of z: within an iteration
- allocateVolume(D_z, dims.iVolWidth, dims.iVolHeight, zPitch);
+ allocateVolumeData(D_z, zPitch, dims);
// Lifetime of p: full algorithm
- allocateVolume(D_p, dims.iVolWidth, dims.iVolHeight, pPitch);
+ allocateVolumeData(D_p, pPitch, dims);
// Lifetime of r: full algorithm
- allocateVolume(D_r, dims.iProjDets, dims.iProjAngles, rPitch);
+ allocateProjectionData(D_r, rPitch, dims);
// Lifetime of w: within an iteration
- allocateVolume(D_w, dims.iProjDets, dims.iProjAngles, wPitch);
+ allocateProjectionData(D_w, wPitch, dims);
// TODO: check if allocations succeeded
return true;
@@ -134,7 +134,7 @@ bool CGLS::iterate(unsigned int iterations)
// p = A'*r
- zeroVolume(D_p, pPitch, dims.iVolWidth, dims.iVolHeight);
+ zeroVolumeData(D_p, pPitch, dims);
callBP(D_p, pPitch, D_r, rPitch);
if (useVolumeMask)
processVol<opMul>(D_p, D_maskData, pPitch, dims.iVolWidth, dims.iVolHeight);
@@ -150,7 +150,7 @@ bool CGLS::iterate(unsigned int iterations)
for (unsigned int iter = 0; iter < iterations && !shouldAbort; ++iter) {
// w = A*p
- zeroVolume(D_w, wPitch, dims.iProjDets, dims.iProjAngles);
+ zeroProjectionData(D_w, wPitch, dims);
callFP(D_p, pPitch, D_w, wPitch, 1.0f);
// alpha = gamma / <w,w>
@@ -165,7 +165,7 @@ bool CGLS::iterate(unsigned int iterations)
// z = A'*r
- zeroVolume(D_z, zPitch, dims.iVolWidth, dims.iVolHeight);
+ zeroVolumeData(D_z, zPitch, dims);
callBP(D_z, zPitch, D_r, rPitch);
if (useVolumeMask)
processVol<opMul>(D_z, D_maskData, zPitch, dims.iVolWidth, dims.iVolHeight);