[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] (no subject)
From: |
Andriy Andreykiv |
Subject: |
[Getfem-commits] (no subject) |
Date: |
Thu, 16 May 2019 04:35:39 -0400 (EDT) |
branch: c14_complience
commit ef504770f9272b37afeefa9a2cb945567aa1e164
Author: Andriy.Andreykiv <address@hidden>
Date: Thu May 16 10:35:24 2019 +0200
assignment of the interpolation result is in critical section, hence can be
moved outside the parallel region
---
src/getfem/getfem_interpolation.h | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/getfem/getfem_interpolation.h
b/src/getfem/getfem_interpolation.h
index 7987ace..ece954b 100644
--- a/src/getfem/getfem_interpolation.h
+++ b/src/getfem/getfem_interpolation.h
@@ -712,12 +712,13 @@ namespace getfem {
interpolation(
mf_source, mf_target, U, V_thrd, M, 0, extrapolation, EPS,
rg_source, rg_target);
-
- GLOBAL_OMP_GUARD
- for (size_type i = 0; i < V_thrd.size(); ++i) {
- if (gmm::abs(V_thrd[i]) > EPS) V[i] = V_thrd[i];
- }
)
+ for (size_type thread = 0; thread != V_distributed.num_threads();
++thread){
+ auto &V_thrd = V_distributed(thread);
+ for (size_type i = 0; i < V_thrd.size(); ++i) {
+ if (gmm::abs(V_thrd[i]) > EPS) V[i] = V_thrd[i];
+ }
+ }
if (partitioning_allowed) rg_source.allow_partitioning();
}
}