diff options
Diffstat (limited to 'src/Hyperslab.c')
-rw-r--r-- | src/Hyperslab.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/Hyperslab.c b/src/Hyperslab.c index f793592..6342fcb 100644 --- a/src/Hyperslab.c +++ b/src/Hyperslab.c @@ -14,7 +14,7 @@ static const char *rcsid = "$Header$"; CCTK_FILEVERSION(CactusPUGH_PUGHSlab_Hyperslab_c) /* enable debugging output */ -/*#define DEBUG 1*/ +/* #define DEBUG 1 */ /* macros for getting the minimum/maximum value */ #ifdef MIN @@ -123,17 +123,16 @@ CCTK_FILEVERSION(CactusPUGH_PUGHSlab_Hyperslab_c) /*** local function prototypes ***/ /* Gerd's routine to get 1D lines from a 3D array */ -int Hyperslab_CollectData1D (cGH *GH, int vindex, int vtimelvl, +int Hyperslab_CollectData1D (const cGH *GH, int vindex, int vtimelvl, const int *origin, const int *directions, - int downsampling, int length, void **hdata, int *hsize, int proc); /* routine to check parameters passed to the Hyperslab routines */ -static const char *checkParameters (cGH *GH, int vindex, int vtimelvl, +static const char *checkParameters (const cGH *GH, int vindex, int vtimelvl, int hdim, const int global_startpoint[/*vdim*/], const int directions[/*vdim*/], @@ -164,7 +163,7 @@ static const char *checkParameters (cGH *GH, int vindex, int vtimelvl, @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH + @vtype const cGH * @vio in @endvar @var vindex @@ -231,7 +230,7 @@ static const char *checkParameters (cGH *GH, int vindex, int vtimelvl, @vio out @endvar @@*/ -int Hyperslab_GetLocalHyperslab (cGH *GH, int vindex, int vtimelvl, +int Hyperslab_GetLocalHyperslab (const cGH *GH, int vindex, int vtimelvl, int hdim, const int global_startpoint[/*vdim*/], const int directions[/*vdim*/], @@ -360,7 +359,7 @@ int Hyperslab_GetLocalHyperslab (cGH *GH, int vindex, int vtimelvl, npoints++; } my_global_startpoint[vdim] = global_startpoint[vdim] + - npoints*downsample[vdim]; + npoints*downsample[vdim]; } else { @@ -381,10 +380,10 @@ int Hyperslab_GetLocalHyperslab (cGH *GH, int vindex, int vtimelvl, if (my_global_startpoint[vdim] >= 0 && my_global_startpoint[vdim] < MY_GLOBAL_EP (GA->extras, myproc, - stagger_index, vdim)) + stagger_index, vdim)) { startpoint[vdim] = my_global_startpoint[vdim] - - GA->extras->lb[myproc][vdim]; + GA->extras->lb[myproc][vdim]; } else { @@ -392,10 +391,10 @@ int Hyperslab_GetLocalHyperslab (cGH *GH, int vindex, int vtimelvl, } if (global_endpoint[vdim] > MY_GLOBAL_SP (GA->extras, myproc, - stagger_index, vdim)) + stagger_index, vdim)) { endpoint[vdim] = MIN (MY_LOCAL_EP (GA->extras, stagger_index, vdim), - global_endpoint[vdim] - GA->extras->lb[myproc][vdim]); + global_endpoint[vdim] - GA->extras->lb[myproc][vdim]); } else { @@ -612,7 +611,7 @@ int Hyperslab_GetLocalHyperslab (cGH *GH, int vindex, int vtimelvl, @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH + @vtype const cGH * @vio in @endvar @var vindex @@ -668,7 +667,7 @@ int Hyperslab_GetLocalHyperslab (cGH *GH, int vindex, int vtimelvl, @vio out @endvar @@*/ -int Hyperslab_GetHyperslab (cGH *GH, int target_proc, int vindex, int vtimelvl, +int Hyperslab_GetHyperslab (const cGH *GH, int target_proc, int vindex, int vtimelvl, int hdim, const int global_startpoint[/*vdim*/], const int directions[/*vdim*/], @@ -1017,7 +1016,7 @@ int Hyperslab_GetHyperslab (cGH *GH, int target_proc, int vindex, int vtimelvl, /********************** local routines ************************************/ -static const char *checkParameters (cGH *GH, int vindex, int vtimelvl, +static const char *checkParameters (const cGH *GH, int vindex, int vtimelvl, int hdim, const int global_startpoint[/*vdim*/], const int directions[/*vdim*/], |