aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8>2009-11-18 18:31:56 +0000
committerschnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8>2009-11-18 18:31:56 +0000
commit22ae969dd0db6b1f087b46d2f9e4ccb4ca154b4f (patch)
treeeaac419eaa1ab05a133e84bf4fe3ffac61326240
parent055532b4198fd9bccb6a9e3671a62a9f2cf07f77 (diff)
Correct OpenMP syntax error
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@67 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8
-rw-r--r--src/slab.cc35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/slab.cc b/src/slab.cc
index a60eebc..037c298 100644
--- a/src/slab.cc
+++ b/src/slab.cc
@@ -755,23 +755,24 @@ copy_data (const vector<xfer> &info,
assert(srcptr);
# pragma omp parallel for
- {
- int ipos[SLAB_MAXDIM];
- for (ipos[2] = 0; ipos[2] < srcdetaillenk; ++ipos[2]) {
- for (ipos[1] = 0; ipos[1] < srcdetaillenj; ++ipos[1]) {
- for (ipos[0] = 0; ipos[0] < srcdetailleni; ++ipos[0]) {
- int const srcindi = srcdetailoffi + ipos[0] - srcoffi;
- int const srcindj = srcdetailoffj + ipos[1] - srcoffj;
- int const srcindk = srcdetailoffk + ipos[2] - srcoffk;
- ifcheck assert (srcindi>=0 and srcindi<srcleni);
- ifcheck assert (srcindj>=0 and srcindj<srclenj);
- ifcheck assert (srcindk>=0 and srcindk<srclenk);
- size_t const srcind =
- srcindi + srcleni * (srcindj + srclenj * srcindk);
- size_t const bufind =
- ipos[xpose_x] + dstdetailleni * (ipos[xpose_y] + dstdetaillenj * ipos[xpose_z]);
- srcdataptr[bufind] = srcptr[srcind];
- }
+ for (int k = 0; k < srcdetaillenk; ++k) {
+ for (int j = 0; j < srcdetaillenj; ++j) {
+ for (int i = 0; i < srcdetailleni; ++i) {
+ int ipos[SLAB_MAXDIM];
+ ipos[0] = i;
+ ipos[1] = j;
+ ipos[2] = k;
+ int const srcindi = srcdetailoffi + ipos[0] - srcoffi;
+ int const srcindj = srcdetailoffj + ipos[1] - srcoffj;
+ int const srcindk = srcdetailoffk + ipos[2] - srcoffk;
+ ifcheck assert (srcindi>=0 and srcindi<srcleni);
+ ifcheck assert (srcindj>=0 and srcindj<srclenj);
+ ifcheck assert (srcindk>=0 and srcindk<srclenk);
+ size_t const srcind =
+ srcindi + srcleni * (srcindj + srclenj * srcindk);
+ size_t const bufind =
+ ipos[xpose_x] + dstdetailleni * (ipos[xpose_y] + dstdetaillenj * ipos[xpose_z]);
+ srcdataptr[bufind] = srcptr[srcind];
}
}
}