summaryrefslogtreecommitdiffstats
path: root/src/CompositeGeometryManager.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-11-22 16:41:34 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-11-22 16:41:34 +0100
commita527cc9e29cae256bd095b032f34c80957e84907 (patch)
treee68dd547d6a88c188eca4798423adf084ba58124 /src/CompositeGeometryManager.cpp
parent6a7b605102f1c22224b516906cb4a848cda50a3b (diff)
parentbd2798bed2fddfe00dac006013a9fb1363417f20 (diff)
downloadastra-a527cc9e29cae256bd095b032f34c80957e84907.tar.gz
astra-a527cc9e29cae256bd095b032f34c80957e84907.tar.bz2
astra-a527cc9e29cae256bd095b032f34c80957e84907.tar.xz
astra-a527cc9e29cae256bd095b032f34c80957e84907.zip
Merge branch 'master' into parallel_vec
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;