summaryrefslogtreecommitdiffstats
path: root/src/CompositeGeometryManager.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2017-10-18 23:00:25 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-10-19 13:25:07 +0200
commit521825da92af4d3a08609241353517b8ec7e780c (patch)
tree2b02c2fa62f393cb9381ccfaf9822d2fc3852dac /src/CompositeGeometryManager.cpp
parentd1e2b4f904266c94f4ebf9fc5c95d495c95b0d5c (diff)
downloadastra-521825da92af4d3a08609241353517b8ec7e780c.tar.gz
astra-521825da92af4d3a08609241353517b8ec7e780c.tar.bz2
astra-521825da92af4d3a08609241353517b8ec7e780c.tar.xz
astra-521825da92af4d3a08609241353517b8ec7e780c.zip
Fix output initialization for MODE_ADD CGM jobs
Diffstat (limited to 'src/CompositeGeometryManager.cpp')
-rw-r--r--src/CompositeGeometryManager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/CompositeGeometryManager.cpp b/src/CompositeGeometryManager.cpp
index a4dace2..184144c 100644
--- a/src/CompositeGeometryManager.cpp
+++ b/src/CompositeGeometryManager.cpp
@@ -1386,6 +1386,12 @@ static bool doJob(const CCompositeGeometryManager::TJobSet::const_iterator& iter
bool ok = dstMem->allocateGPUMemory(outx, outy, outz, zero ? astraCUDA3d::INIT_ZERO : astraCUDA3d::INIT_NO);
if (!ok) ASTRA_ERROR("Error allocating GPU memory");
+ if (!zero) {
+ // instead of zeroing output memory, copy from host
+ ok = dstMem->copyToGPUMemory(dstdims);
+ if (!ok) ASTRA_ERROR("Error copying output data to GPU");
+ }
+
for (CCompositeGeometryManager::TJobList::const_iterator i = L.begin(); i != L.end(); ++i) {
const CCompositeGeometryManager::SJob &j = *i;