diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2012-02-24 15:47:08 -0500 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2012-09-11 18:23:03 +0100 |
commit | 98e2f3315e6210e1c4c4c392eaa855d8ece56641 (patch) | |
tree | 21a139dfab764ccd47205bd65044225f2e584852 /Carpet/CarpetLib/src/data.cc | |
parent | a50b94db8d36ffd6c9aca449299e8148c2b8fd33 (diff) |
CarpetLib: Move some OpenMP parallelisation into the operators
Diffstat (limited to 'Carpet/CarpetLib/src/data.cc')
-rw-r--r-- | Carpet/CarpetLib/src/data.cc | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/Carpet/CarpetLib/src/data.cc b/Carpet/CarpetLib/src/data.cc index 1ee6c94e7..633b8bf5d 100644 --- a/Carpet/CarpetLib/src/data.cc +++ b/Carpet/CarpetLib/src/data.cc @@ -543,21 +543,21 @@ copy_from_innerloop (gdata const * const gsrc, ibbox const& dstbox = this->extent(); #if CARPET_DIM == 3 - call_operator<T> (& copy_3d, - static_cast <T const *> (src->storage()), - src->shape(), - static_cast <T *> (this->storage()), - this->shape(), - srcbox, dstbox, - srcregbox, dstregbox, (void*)slabinfo); + // Don't use call_operator, because we parallelise ourselves + copy_3d(static_cast <T const *> (src->storage()), + src->shape(), + static_cast <T *> (this->storage()), + this->shape(), + srcbox, dstbox, + srcregbox, dstregbox, (void*)slabinfo); #elif CARPET_DIM == 4 - call_operator<T> (& copy_4d, - static_cast <T const *> (src->storage()), - src->shape(), - static_cast <T *> (this->storage()), - this->shape(), - srcbox, dstbox, - srcregbox, dstregbox, (void*)slabinfo); + // Don't use call_operator, because we parallelise ourselves + copy_4d(static_cast <T const *> (src->storage()), + src->shape(), + static_cast <T *> (this->storage()), + this->shape(), + srcbox, dstbox, + srcregbox, dstregbox, (void*)slabinfo); #else # error "Value for CARPET_DIM not supported" #endif @@ -776,14 +776,14 @@ transfer_prolongate (data const * const src, } case cell_centered: { if (use_dgfe) { - call_operator<T>(prolongate_3d_dgfe_rf2<T,5>, - static_cast<T const *>(src->storage()), - src->shape(), - static_cast<T *>(this->storage()), - this->shape(), - src->extent(), - this->extent(), - srcbox, dstbox, NULL); + // Don't use call_operator, because we parallelise ourselves + prolongate_3d_dgfe_rf2<T,5>(static_cast<T const *>(src->storage()), + src->shape(), + static_cast<T *>(this->storage()), + this->shape(), + src->extent(), + this->extent(), + srcbox, dstbox, NULL); break; } static @@ -1135,51 +1135,51 @@ transfer_restrict (data const * const src, if (all(is_centered == ivect(1,1,1))) { if (use_dgfe) { - call_operator<T>(restrict_3d_dgfe_rf2<T,5>, - static_cast<T const *>(src->storage()), + // Don't use call_operator, because we parallelise ourselves + restrict_3d_dgfe_rf2<T,5>(static_cast<T const *>(src->storage()), + src->shape(), + static_cast<T *>(this->storage()), + this->shape(), + srcbox, + dstbox, + srcregbox, dstregbox, NULL); + break; + } + // Don't use call_operator, because we parallelise ourselves + restrict_3d_cc_rf2(static_cast <T const *> (src->storage()), src->shape(), - static_cast<T *>(this->storage()), + static_cast <T *> (this->storage()), this->shape(), srcbox, dstbox, srcregbox, dstregbox, NULL); - break; - } - call_operator<T> (& restrict_3d_cc_rf2, - static_cast <T const *> (src->storage()), - src->shape(), - static_cast <T *> (this->storage()), - this->shape(), - srcbox, - dstbox, - srcregbox, dstregbox, NULL); } else if (all(is_centered == ivect(0,1,1))) { - call_operator<T> (& restrict_3d_vc_rf2<T,0,1,1>, - static_cast <T const *> (src->storage()), - src->shape(), - static_cast <T *> (this->storage()), - this->shape(), - srcbox, - dstbox, - srcregbox, dstregbox, NULL); + // Don't use call_operator, because we parallelise ourselves + restrict_3d_vc_rf2<T,0,1,1>(static_cast <T const *> (src->storage()), + src->shape(), + static_cast <T *> (this->storage()), + this->shape(), + srcbox, + dstbox, + srcregbox, dstregbox, NULL); } else if (all(is_centered == ivect(1,0,1))) { - call_operator<T> (& restrict_3d_vc_rf2<T,1,0,1>, - static_cast <T const *> (src->storage()), - src->shape(), - static_cast <T *> (this->storage()), - this->shape(), - srcbox, - dstbox, - srcregbox, dstregbox, NULL); + // Don't use call_operator, because we parallelise ourselves + restrict_3d_vc_rf2<T,1,0,1>(static_cast <T const *> (src->storage()), + src->shape(), + static_cast <T *> (this->storage()), + this->shape(), + srcbox, + dstbox, + srcregbox, dstregbox, NULL); } else if (all(is_centered == ivect(1,1,0))) { - call_operator<T> (& restrict_3d_vc_rf2<T,1,1,0>, - static_cast <T const *> (src->storage()), - src->shape(), - static_cast <T *> (this->storage()), - this->shape(), - srcbox, - dstbox, - srcregbox, dstregbox, NULL); + // Don't use call_operator, because we parallelise ourselves + restrict_3d_vc_rf2<T,1,1,0>(static_cast <T const *> (src->storage()), + src->shape(), + static_cast <T *> (this->storage()), + this->shape(), + srcbox, + dstbox, + srcregbox, dstregbox, NULL); } else { assert (0); } @@ -1203,14 +1203,14 @@ transfer_restrict (data const * const src, // enum centering { vertex_centered, cell_centered }; switch (cent) { case vertex_centered: - call_operator<T> (& restrict_4d_rf2, - static_cast <T const *> (src->storage()), - src->shape(), - static_cast <T *> (this->storage()), - this->shape(), - src->extent(), - this->extent(), - srcregbox, dstregbox, NULL); + // Don't use call_operator, because we parallelise ourselves + restrict_4d_rf2(static_cast <T const *> (src->storage()), + src->shape(), + static_cast <T *> (this->storage()), + this->shape(), + src->extent(), + this->extent(), + srcregbox, dstregbox, NULL); break; default: assert (0); |