summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2022-10-10 18:49:57 +0200
committerJaron Kent-Dobias <jaron@kent-dobias.com>2022-10-10 18:49:57 +0200
commit28c5df9b92f3403b368f774505d34437920acb7c (patch)
tree5ebb09018739ff9aa96c0384cace28604e0d8ccf
parent3961d9c977933192c39c456d7a5b2e0f4acb174a (diff)
downloadcode-28c5df9b92f3403b368f774505d34437920acb7c.tar.gz
code-28c5df9b92f3403b368f774505d34437920acb7c.tar.bz2
code-28c5df9b92f3403b368f774505d34437920acb7c.zip
Enabled cheap parallelization.
-rw-r--r--uniform.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/uniform.cpp b/uniform.cpp
index 474399b..08f190a 100644
--- a/uniform.cpp
+++ b/uniform.cpp
@@ -37,6 +37,7 @@ public:
void computeWeights() {
for (std::vector<Face>& faces : lattices) {
+#pragma omp parallel for
for (Face& f : faces) {
Real w = f[0].get().weights.top();
Real x = f[1].get().weights.top();
@@ -60,6 +61,7 @@ public:
void computeProbabilities() { // destroys *all* weights
for (auto it = lattices.rbegin(); it != lattices.rend(); it++) {
+#pragma omp parallel for
for (Face& f : *it) {
Real p = f[0].get().probability;
Real q = f[1].get().probability;