aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@10716dce-81a3-4424-a2c8-48026a0d3035>2003-09-01 12:57:52 +0000
committertradke <tradke@10716dce-81a3-4424-a2c8-48026a0d3035>2003-09-01 12:57:52 +0000
commitdc8b4c3e54fd07c0819649d543d47c6c1ad08825 (patch)
treeec46fcef49fa514d60d45e90b469723c18b4d26b
parent3a2760c0e255059b186194f505790e34793803db (diff)
Declare the cGH pointer in aliased routines as CCTK_POINTER_TO_CONST
so that it matches the CST-generated function prototype. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHSlab/trunk@111 10716dce-81a3-4424-a2c8-48026a0d3035
-rw-r--r--src/GetHyperslab.c9
-rw-r--r--src/Mapping.c6
-rw-r--r--src/PUGHSlab.h22
3 files changed, 21 insertions, 16 deletions
diff --git a/src/GetHyperslab.c b/src/GetHyperslab.c
index f0ec33c..7ee108e 100644
--- a/src/GetHyperslab.c
+++ b/src/GetHyperslab.c
@@ -57,7 +57,7 @@ static void SortIntoUnchunkedHyperslab (const hslab_mapping_t *mapping,
#endif
-CCTK_INT PUGHSlab_Get (const cGH *GH,
+CCTK_INT PUGHSlab_Get (CCTK_POINTER_TO_CONST _GH,
CCTK_INT mapping_handle,
CCTK_INT proc,
CCTK_INT vindex,
@@ -66,6 +66,8 @@ CCTK_INT PUGHSlab_Get (const cGH *GH,
void *hdata)
{
CCTK_INT retval;
+ const cGH *GH = _GH;
+
retval = PUGHSlab_GetList (GH, mapping_handle, 1, &proc, &vindex, &timelevel,
hdatatype >= 0 ? &hdatatype : NULL, &hdata, NULL);
@@ -74,20 +76,21 @@ CCTK_INT PUGHSlab_Get (const cGH *GH,
}
-CCTK_INT PUGHSlab_GetList (const cGH *GH,
+CCTK_INT PUGHSlab_GetList (CCTK_POINTER_TO_CONST _GH,
CCTK_INT mapping_handle,
CCTK_INT num_arrays,
const CCTK_INT *procs /* num_arrays */,
const CCTK_INT *vindices /* num_arrays */,
const CCTK_INT *timelevels /* num_arrays */,
const CCTK_INT *hdatatypes /* num_arrays */,
- void *const *hdata /* num_arrays */,
+ const CCTK_POINTER *hdata /* num_arrays */,
CCTK_INT *retvals /* num_arrays */)
{
int i, timelevel, hdatatype, hdata_size, retval;
CCTK_INT result, *result_ptr;
hslab_mapping_t *mapping;
void *local_hdata;
+ const cGH *GH = _GH;
#ifdef CCTK_MPI
int myproc, nprocs, proc;
MPI_Comm comm;
diff --git a/src/Mapping.c b/src/Mapping.c
index 5bb1d76..bd6efdf 100644
--- a/src/Mapping.c
+++ b/src/Mapping.c
@@ -69,7 +69,7 @@ static int IsFullHyperslab (const pGA *GA,
const hslab_mapping_t *mapping);
-CCTK_INT PUGHSlab_DefineLocalMappingByIndex (const cGH *GH,
+CCTK_INT PUGHSlab_DefineLocalMappingByIndex (CCTK_POINTER_TO_CONST _GH,
CCTK_INT vindex,
CCTK_INT hdim,
const CCTK_INT *direction,
@@ -83,6 +83,7 @@ CCTK_INT PUGHSlab_DefineLocalMappingByIndex (const cGH *GH,
CCTK_INT *hoffset_global)
{
CCTK_INT retval;
+ const cGH *GH = _GH;
retval = DefineMapping (GH, vindex, hdim, direction, origin, extent,
@@ -92,7 +93,7 @@ CCTK_INT PUGHSlab_DefineLocalMappingByIndex (const cGH *GH,
}
-CCTK_INT PUGHSlab_DefineGlobalMappingByIndex (const cGH *GH,
+CCTK_INT PUGHSlab_DefineGlobalMappingByIndex (CCTK_POINTER_TO_CONST _GH,
CCTK_INT vindex,
CCTK_INT hdim,
const CCTK_INT *direction,
@@ -104,6 +105,7 @@ CCTK_INT PUGHSlab_DefineGlobalMappingByIndex (const cGH *GH,
CCTK_INT *hsize)
{
CCTK_INT retval;
+ const cGH *GH = _GH;
retval = DefineMapping (GH, vindex, hdim, direction, origin, extent,
diff --git a/src/PUGHSlab.h b/src/PUGHSlab.h
index 8383280..5a562e0 100644
--- a/src/PUGHSlab.h
+++ b/src/PUGHSlab.h
@@ -27,24 +27,24 @@ typedef CCTK_INT (*t_hslabConversionFn) (CCTK_INT nelems,
CCTK_POINTER dst);
/* function prototypes */
-CCTK_INT PUGHSlab_Get (const cGH *GH,
- CCTK_INT mapping_handle,
- CCTK_INT proc,
- CCTK_INT vindex,
- CCTK_INT timelevel,
- CCTK_INT hdatatype,
- void *hdata);
-CCTK_INT PUGHSlab_GetList (const cGH *GH,
+CCTK_INT PUGHSlab_Get (CCTK_POINTER_TO_CONST _GH,
+ CCTK_INT mapping_handle,
+ CCTK_INT proc,
+ CCTK_INT vindex,
+ CCTK_INT timelevel,
+ CCTK_INT hdatatype,
+ CCTK_POINTER hdata);
+CCTK_INT PUGHSlab_GetList (CCTK_POINTER_TO_CONST _GH,
CCTK_INT mapping_handle,
CCTK_INT num_arrays,
const CCTK_INT *procs, /* num_arrays */
const CCTK_INT *vindices, /* num_arrays */
const CCTK_INT *timelevels, /* num_arrays */
const CCTK_INT *hdatatypes, /* num_arrays */
- void *const *hdata, /* num_arrays */
+ const CCTK_POINTER *hdata, /* num_arrays */
CCTK_INT *retvals /* num_arrays */);
CCTK_INT PUGHSlab_DefineLocalMappingByIndex (
- const cGH *GH,
+ CCTK_POINTER_TO_CONST _GH,
CCTK_INT vindex,
CCTK_INT hdim,
const CCTK_INT *direction, /* vdim*hdim */
@@ -58,7 +58,7 @@ CCTK_INT PUGHSlab_DefineLocalMappingByIndex (
CCTK_INT *hoffset_global /* hdim */);
CCTK_INT PUGHSlab_DefineGlobalMappingByIndex (
- const cGH *GH,
+ CCTK_POINTER_TO_CONST _GH,
CCTK_INT vindex,
CCTK_INT hdim,
const CCTK_INT *direction, /* vdim*hdim */