Skip to content

Commit

Permalink
Fix for projectors[].clear() loop
Browse files Browse the repository at this point in the history
  • Loading branch information
do-jason committed Oct 12, 2022
1 parent a25536e commit 9908f51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ml_optimiser_mpi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,9 @@ void MlOptimiserMpi::expectation()
std::cerr << "Faux thread id: " << b->thread_id << std::endl;
#endif

for (int j = 0; j < b->projectors.size(); j++)
b->projectors[j].clear();

for (int j = 0; j < b->backprojectors.size(); j++)
{
unsigned long s = wsum_model.BPref[j].data.nzyxdim;
Expand All @@ -1493,7 +1496,6 @@ void MlOptimiserMpi::expectation()
wsum_model.BPref[j].weight.data[n] += (RFLOAT) weights[n];
}

b->projectors[j].clear();
b->backprojectors[j].clear();
}

Expand Down

0 comments on commit 9908f51

Please sign in to comment.