Skip to content
Snippets Groups Projects
Commit 9cb2202f authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Move memory from temporary workspace rather than copy

parent 94768652
No related branches found
No related tags found
No related merge requests found
...@@ -219,7 +219,13 @@ void LoadEventAndCompress::exec() { ...@@ -219,7 +219,13 @@ void LoadEventAndCompress::exec() {
for (size_t i = 1; i < numRows; ++i) { for (size_t i = 1; i < numRows; ++i) {
MatrixWorkspace_sptr temp = loadChunk(i); MatrixWorkspace_sptr temp = loadChunk(i);
temp = processChunk(temp); temp = processChunk(temp);
resultWS = plus(resultWS, temp); auto plusAlg = createChildAlgorithm("Plus");
plusAlg->setProperty("LHSWorkspace", resultWS);
plusAlg->setProperty("RHSWorkspace", temp);
plusAlg->setProperty("OutputWorkspace", resultWS);
plusAlg->setProperty("ClearRHSWorkspace", true);
plusAlg->executeAsChildAlg();
resultWS = plusAlg->getProperty("OutputWorkspace");
} }
Workspace_sptr total = assemble(resultWS); Workspace_sptr total = assemble(resultWS);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment