diff options
author | tradke <tradke@10716dce-81a3-4424-a2c8-48026a0d3035> | 2000-09-01 09:38:37 +0000 |
---|---|---|
committer | tradke <tradke@10716dce-81a3-4424-a2c8-48026a0d3035> | 2000-09-01 09:38:37 +0000 |
commit | 419d9d9a1454d82670320f5162b8f968e1637fd2 (patch) | |
tree | 869f9704265150c88fc42726db8f86194d4bd0ba /src/Hyperslab.c | |
parent | 5b0e72d0414102ad7781a5a60cdc9b06ea4b53ce (diff) |
Bugfix for sorting chunks into global hyperslab.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHSlab/trunk@33 10716dce-81a3-4424-a2c8-48026a0d3035
Diffstat (limited to 'src/Hyperslab.c')
-rw-r--r-- | src/Hyperslab.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Hyperslab.c b/src/Hyperslab.c index 7cee730..2870dc5 100644 --- a/src/Hyperslab.c +++ b/src/Hyperslab.c @@ -836,10 +836,14 @@ int Hyperslab_GetHyperslab (cGH *GH, int target_proc, int vindex, int vtimelvl, i = 1; } - /* copy the line */ - for (linear_hoffset = 0, j = 1; j < hdim; j++) + /* get the linear offset */ + linear_hoffset = hoffset_chunk [0]; + for (j = 1; j < hdim; j++) + { linear_hoffset += (hoffset_chunk [j] + point [j]) * points_per_hdim [j]; + } + /* copy the line */ memcpy (copy_to + linear_hoffset * vtypesize, copy_from, hsize_chunk [0] * vtypesize); copy_from += hsize_chunk [0] * vtypesize; |