diff options
author | schnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8> | 2003-06-19 11:02:44 +0000 |
---|---|---|
committer | schnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8> | 2003-06-19 11:02:44 +0000 |
commit | d89f53f20721121be6a92a56c0deae64d3363db1 (patch) | |
tree | 280173150f18740c608432bc0162ccd8faecfd29 | |
parent | ea02c23168e25979a327f2bb1401ea0af68dc97d (diff) |
Move declarations before statements.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@24 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8
-rw-r--r-- | src/slab.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -88,13 +88,13 @@ void Slab_PrintTimers (void) /* Find out which driver to use */ #ifdef CCTK_MPI -# if defined CARPET_CARPET +# if defined CARPET_CARPET || defined CARPETORIG_CARPET # include "Carpet/Carpet/src/carpet_public.h" # endif # if defined CACTUSPUGH_PUGH # include "CactusPUGH/PUGH/src/include/pugh.h" # endif -# if ! defined CARPET_CARPET && ! defined CACTUSPUGH_PUGH +# if ! defined CARPET_CARPET && ! defined CARPETORIG_CARPET && ! defined CACTUSPUGH_PUGH # error "No supported driver thorn included" # endif #endif @@ -269,7 +269,7 @@ static MPI_Comm get_mpi_comm (const cGH * restrict const cctkGH) { #ifdef CCTK_MPI -# if defined CARPET_CARPET +# if defined CARPET_CARPET || defined CARPETORIG_CARPET if (CCTK_IsThornActive ("Carpet")) { return CarpetMPIComm (); } @@ -1003,11 +1003,11 @@ if (n<size-1) assert (srcoffset[n+1]==srcoffset[n]+srcdetailleni*srcdetaillenj*s int const srcindi = srcdetailoffi + i - srcoffi; int const srcindj = srcdetailoffj + j - srcoffj; int const srcindk = srcdetailoffk + k - srcoffk; + size_t const srcind = srcindi + srcleni * (srcindj + srclenj * srcindk); + size_t const bufind = i + srcdetailleni * (j + srcdetaillenj * k); ifcheck assert (srcindi>=0 && srcindi<srcleni); ifcheck assert (srcindj>=0 && srcindj<srclenj); ifcheck assert (srcindk>=0 && srcindk<srclenk); - size_t const srcind = srcindi + srcleni * (srcindj + srclenj * srcindk); - size_t const bufind = i + srcdetailleni * (j + srcdetaillenj * k); ((CCTK_REAL*)srcdata)[srcoffset[n] + bufind] = ((const CCTK_REAL*)srcptr)[srcind]; } } @@ -1129,10 +1129,10 @@ if (n<size-1) assert (srcoffset[n+1]==srcoffset[n]+srcdetailleni*srcdetaillenj*s int const dstindi = dstdetailoffi + i - dstoffi; int const dstindj = dstdetailoffj + j - dstoffj; int const dstindk = dstdetailoffk + k - dstoffk; + size_t const dstind = dstindi + dstleni * (dstindj + dstlenj * dstindk); ifcheck assert (dstindi>=0 && dstindi<dstleni); ifcheck assert (dstindj>=0 && dstindj<dstlenj); ifcheck assert (dstindk>=0 && dstindk<dstlenk); - size_t const dstind = dstindi + dstleni * (dstindj + dstlenj * dstindk); ((CCTK_REAL*)dstptr)[dstind] = ((const CCTK_REAL*)dstdata)[dstoffset[n] + bufind]; } } |