diff options
author | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2001-11-05 15:01:47 +0000 |
---|---|---|
committer | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2001-11-05 15:01:47 +0000 |
commit | 58fce8ad2b83e344c5cab6401ddcf1e2c8d25cbf (patch) | |
tree | 48172307cb5ff3a2699a2e3bdd8937c8717c5248 | |
parent | 4017bb013c47a27a265a280690b9144efecf9405 (diff) |
Added const qualifier to the 'cGH *' argument of some more overloadable functions.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@363 b61c5cb5-eaca-4651-9a7a-d64986f99364
-rw-r--r-- | src/GHExtension.c | 7 | ||||
-rw-r--r-- | src/Overloadables.c | 4 | ||||
-rw-r--r-- | src/Storage.c | 8 | ||||
-rw-r--r-- | src/pugh_Comm.h | 53 |
4 files changed, 30 insertions, 42 deletions
diff --git a/src/GHExtension.c b/src/GHExtension.c index dec849e..29097d7 100644 --- a/src/GHExtension.c +++ b/src/GHExtension.c @@ -28,6 +28,9 @@ CCTK_FILEVERSION(CactusPUGH_pugh_GHExtension_c) /* prototypes of routines defined in this source file */ int PUGH_PrintTimingInfo (cGH *GH); +void PUGH_RegisterCallFunc (int (* func) (void *function, + cFunctionData *fdata, + void *data)); static int (* PUGHCallFunc)(void *function, cFunctionData *fdata, void *data) = NULL; @@ -357,7 +360,9 @@ int PUGH_ScheduleTraverseGH (cGH *GH, return (retval); } -void PUGH_RegisterCallFunc(int (* func)(void *function, cFunctionData *fdata, void *data)) +void PUGH_RegisterCallFunc (int (* func) (void *function, + cFunctionData *fdata, + void *data)) { PUGHCallFunc = func; } diff --git a/src/Overloadables.c b/src/Overloadables.c index 9984d78..ebb2551 100644 --- a/src/Overloadables.c +++ b/src/Overloadables.c @@ -29,7 +29,7 @@ CCTK_FILEVERSION(CactusPUGH_PUGH_Overloadables_c) @var GH @vdesc Pointer to CCTK GH - @vtype cGH * + @vtype const cGH * @vio in @endvar @var group @@ -51,7 +51,7 @@ CCTK_FILEVERSION(CactusPUGH_PUGH_Overloadables_c) -3 if given GH pointer is invalid @endreturndesc @@*/ -int PUGH_GroupDynamicData (cGH *GH, int group, cGroupDynamicData *data) +int PUGH_GroupDynamicData (const cGH *GH, int group, cGroupDynamicData *data) { int gtype, var; pGH *pughGH; diff --git a/src/Storage.c b/src/Storage.c index 9c8cf90..8666ed4 100644 --- a/src/Storage.c +++ b/src/Storage.c @@ -71,7 +71,7 @@ void PUGHi_PrintStorageReport (void); @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH * + @vtype const cGH * @vio in @endvar @var dir @@ -96,7 +96,7 @@ void PUGHi_PrintStorageReport (void); NULL if given direction or group index/name are invalid @endreturndesc @@*/ -const int *PUGH_ArrayGroupSize (cGH *GH, +const int *PUGH_ArrayGroupSize (const cGH *GH, int dir, int group, const char *groupname) @@ -171,7 +171,7 @@ const int *PUGH_ArrayGroupSize (cGH *GH, @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH * + @vtype const cGH * @vio in @endvar @var group @@ -192,7 +192,7 @@ const int *PUGH_ArrayGroupSize (cGH *GH, -1 if given group index/name is invalid @endreturndesc @@*/ -int PUGH_QueryGroupStorage (cGH *GH, int group, const char *groupname) +int PUGH_QueryGroupStorage (const cGH *GH, int group, const char *groupname) { int first_var; int storage; diff --git a/src/pugh_Comm.h b/src/pugh_Comm.h index 4a67405..540e4bb 100644 --- a/src/pugh_Comm.h +++ b/src/pugh_Comm.h @@ -2,10 +2,10 @@ @header pugh_Comm.h @date Thu Feb 4 11:42:50 1999 @author Tom Goodale - @desc - - @enddesc - @version $Header$ + @desc + Prototypes of functions to be overloaded by PUGH + @enddesc + @version $Header$ @@*/ #ifndef _PUGH_COMM_H_ @@ -16,39 +16,22 @@ extern "C" { #endif - /* Overloaded functions. */ -int PUGH_SyncGroup(cGH *GH, const char *group); -int PUGH_EnableGroupStorage(cGH *GH, const char *group); -int PUGH_DisableGroupStorage(cGH *GH, const char *group); - -int PUGH_EnableGroupComm(cGH *GH, const char *group); -int PUGH_DisableGroupComm(cGH *GH, const char *group); - -int PUGH_Barrier(const cGH *GH); -int PUGH_Reduce(cGH *GH, - const char *operation, - int n_infields, - int n_outfields, - int out_type, - void **outarray, - ...); - -int PUGH_Interp(cGH *GH, - const char *operation, - int n_coords, - int n_infields, - int n_outfields, - int n_points, - int type, - ...); - -const int *PUGH_ArrayGroupSize(cGH *GH, int dir, int vindex, const char *groupname); -int PUGH_QueryGroupStorage(cGH *GH, int group, const char *groupname); - -int PUGH_GroupDynamicData(cGH *GH, int group, cGroupDynamicData *data); +int PUGH_Barrier (const cGH *GH); +int PUGH_SyncGroup (cGH *GH, const char *group); + +int PUGH_EnableGroupStorage (cGH *GH, const char *group); +int PUGH_DisableGroupStorage (cGH *GH, const char *group); + +int PUGH_EnableGroupComm (cGH *GH, const char *group); +int PUGH_DisableGroupComm (cGH *GH, const char *group); + +const int *PUGH_ArrayGroupSize (const cGH *GH, int dir, int vindex, const char *groupname); +int PUGH_QueryGroupStorage (const cGH *GH, int group, const char *groupname); + +int PUGH_GroupDynamicData (const cGH *GH, int group, cGroupDynamicData *data); #ifdef __cplusplus } #endif -#endif +#endif /* _PUGH_COMM_H_ */ |