Skip to content

Commit

Permalink
Refs #10370 Reserve memory again in LoadMD.
Browse files Browse the repository at this point in the history
Changes to loadAndAddFrom in MDBox meant memory is no longer reserved in LoadMD, this fixes the issue. Note the performance gain for this, if any, appears marginal.
  • Loading branch information
ianbush committed Oct 16, 2014
1 parent c01e4f8 commit c63a2a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Code/Mantid/Framework/MDAlgorithms/src/LoadMD.cpp
Expand Up @@ -366,7 +366,10 @@ namespace Mantid
if(!box)continue;

if(BoxEventIndex[2*i+1]>0) // Load in memory NOT using the file as the back-end,
{
boxTree[i]->reserveMemoryForLoad(BoxEventIndex[2*i+1]);
boxTree[i]->loadAndAddFrom(loader.get(),BoxEventIndex[2*i],static_cast<size_t>(BoxEventIndex[2*i+1]));
}

}
loader->closeFile();
Expand Down

0 comments on commit c63a2a2

Please sign in to comment.