Add thread parallelism to tally accumulation

This commit is contained in:
Paul Romano 2020-09-16 15:52:05 -05:00
parent cd01829764
commit bc90e6a122

View file

@ -642,6 +642,7 @@ void Tally::accumulate()
double norm = total_source / (settings::n_particles * settings::gen_per_batch);
// Accumulate each result
#pragma omp parallel for
for (int i = 0; i < results_.shape()[0]; ++i) {
for (int j = 0; j < results_.shape()[1]; ++j) {
double val = results_(i, j, TallyResult::VALUE) * norm;