aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2009-11-10 15:42:53 -0600
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 16:45:15 +0000
commitcc347512a46d4804819c738482db54992e7df798 (patch)
treea36bc52128c73382a519d9fce2780b0387ce5676
parent66bc98964754b2c385c5f14d56b45ec4e6287101 (diff)
CarpetLib: Slightly simplify OpenMP parallelisation for AMR operators
-rw-r--r--Carpet/CarpetLib/src/data.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/Carpet/CarpetLib/src/data.cc b/Carpet/CarpetLib/src/data.cc
index 61d809506..fca78d517 100644
--- a/Carpet/CarpetLib/src/data.cc
+++ b/Carpet/CarpetLib/src/data.cc
@@ -78,7 +78,8 @@ call_operator (void
int const my_first_point =
min (last_point, first_point + thread_num * my_num_points);
int const my_last_point =
- max (my_first_point, min (last_point, my_first_point + my_num_points));
+ min (last_point, my_first_point + my_num_points);
+ assert (my_last_point >= my_first_point);
ibbox3 const myregbbox
(regbbox.lower().replace (dir, my_first_point),
regbbox.upper().replace (dir, my_last_point - stride),
@@ -145,7 +146,8 @@ call_operator (void
int const my_first_point =
min (last_point, first_point + thread_num * my_num_points);
int const my_last_point =
- max (my_first_point, min (last_point, my_first_point + my_num_points));
+ min (last_point, my_first_point + my_num_points);
+ assert (my_last_point >= my_first_point);
ibbox4 const myregbbox
(regbbox.lower().replace (dir, my_first_point),
regbbox.upper().replace (dir, my_last_point - stride),