Speedup communication by doing single sum().

This commit is contained in:
Atgeirr Flø Rasmussen committed 2026-05-05 14:29:10 +02:00
1 parent 390e807aa3
commit 26bd980e3d
1 file changed
+1 -3
@@ -585,9 +585,7 @@ regionSum(const ScalarBuffer& property,
totals[regionIdx] += property[j];
}
for (std::size_t i = 0; i < maxNumberOfRegions; ++i) {
totals[i] = comm.sum(totals[i]);
}
comm.sum(totals.data(), totals.size());
return totals;
}