summaryrefslogtreecommitdiff
path: root/src/comm
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-07-14 14:11:32 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-07-14 14:11:32 +0000
commit5821d457cee885257472ca46231b8c97709fc2ed (patch)
tree3b8bb77d01b6d345d9c180e6e6bfa7364a490ec4 /src/comm
parent5c2c6ebc0df70765eb1a8c619e808267068b7237 (diff)
Added a const qualifier to the 'cGH *' argument of the following functions
(and their default overloadables): - CCTK_SyncGroup - CCTK_EnableGroupCommI / CCTK_DisableGroupCommI - CCTK_EnableGroupStorageI / CCTK_DisableGroupStorageI - CCTK_GroupStorageIncrease / CCTK_GroupStorageDecrease - CCTK_CoordRegisterRange / CCTK_CoordRegisterRangePhysIndex You should also update all driver thorns (eg. PUGH) now. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3274 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/comm')
-rw-r--r--src/comm/CactusDefaultComm.c36
-rw-r--r--src/comm/OverloadComm.c16
2 files changed, 28 insertions, 24 deletions
diff --git a/src/comm/CactusDefaultComm.c b/src/comm/CactusDefaultComm.c
index 47ff530b..b959961c 100644
--- a/src/comm/CactusDefaultComm.c
+++ b/src/comm/CactusDefaultComm.c
@@ -76,12 +76,14 @@ int CactusDefaultExit(cGH *GH, int retval);
int CactusDefaultAbort(cGH *GH, int retval);
int CactusDefaultBarrier(const cGH *GH);
-int CactusDefaultEnableGroupStorage(cGH *GH, const char *group);
-int CactusDefaultDisableGroupStorage(cGH *GH, const char *group);
-int CactusDefaultGroupStorageIncrease(cGH *GH, int n_groups, const int *groups,
- const int *timelevels, int *status);
-int CactusDefaultGroupStorageDecrease(cGH *GH, int n_groups, const int *groups,
- const int *timelevels, int *status);
+int CactusDefaultEnableGroupStorage(const cGH *GH, const char *group);
+int CactusDefaultDisableGroupStorage(const cGH *GH, const char *group);
+int CactusDefaultGroupStorageIncrease(const cGH *GH, int n_groups,
+ const int *groups, const int *timelevels,
+ int *status);
+int CactusDefaultGroupStorageDecrease(const cGH *GH, int n_groups,
+ const int *groups, const int *timelevels,
+ int *status);
int CactusDefaultInterpGridArrays (const cGH *GH, int N_dims,
int local_interp_handle,
int param_table_handle,
@@ -466,7 +468,7 @@ int CactusDefaultBarrier (const cGH *GH)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio inout
@vcomment
A driver should replace the appropriate GV pointers on this
@@ -484,7 +486,7 @@ int CactusDefaultBarrier (const cGH *GH)
-1 if group increase storage routine wasn't overloaded
@endreturndesc
@@*/
-int CactusDefaultEnableGroupStorage(cGH *GH, const char *groupname)
+int CactusDefaultEnableGroupStorage(const cGH *GH, const char *groupname)
{
int group, timelevel, retval;
@@ -525,7 +527,7 @@ int CactusDefaultEnableGroupStorage(cGH *GH, const char *groupname)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio inout
@vcomment
A driver should replace the appropriate GV pointers on this
@@ -543,7 +545,7 @@ int CactusDefaultEnableGroupStorage(cGH *GH, const char *groupname)
-1 if group decrease storage routine wasn't overloaded
@endreturndesc
@@*/
-int CactusDefaultDisableGroupStorage(cGH *GH, const char *groupname)
+int CactusDefaultDisableGroupStorage(const cGH *GH, const char *groupname)
{
int group, timelevel, retval;
@@ -588,7 +590,7 @@ int CactusDefaultDisableGroupStorage(cGH *GH, const char *groupname)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio inout
@vcomment
A driver should replace the appropriate GV pointers on this
@@ -623,8 +625,9 @@ int CactusDefaultDisableGroupStorage(cGH *GH, const char *groupname)
groups queried or modified.
@endreturndesc
@@*/
-int CactusDefaultGroupStorageIncrease (cGH *GH, int n_groups, const int *groups,
- const int *timelevels, int *status)
+int CactusDefaultGroupStorageIncrease (const cGH *GH, int n_groups,
+ const int *groups, const int *timelevels,
+ int *status)
{
int i, value, retval;
char *gname;
@@ -687,7 +690,7 @@ int CactusDefaultGroupStorageIncrease (cGH *GH, int n_groups, const int *groups,
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio inout
@endvar
@var n_groups
@@ -719,8 +722,9 @@ int CactusDefaultGroupStorageIncrease (cGH *GH, int n_groups, const int *groups,
for all groups queried or modified.
@endreturndesc
@@*/
-int CactusDefaultGroupStorageDecrease (cGH *GH, int n_groups, const int *groups,
- const int *timelevels, int *status)
+int CactusDefaultGroupStorageDecrease (const cGH *GH, int n_groups,
+ const int *groups, const int *timelevels,
+ int *status)
{
int i, value, retval;
diff --git a/src/comm/OverloadComm.c b/src/comm/OverloadComm.c
index 67b709f3..1b4aa34d 100644
--- a/src/comm/OverloadComm.c
+++ b/src/comm/OverloadComm.c
@@ -151,10 +151,10 @@ void CCTK_FCALL CCTK_FNAME (CCTK_Barrier) (int *ierror, const cGH *GH);
void CCTK_FCALL CCTK_FNAME (CCTK_Exit) (int *ierror, cGH *GH, const int *retval);
void CCTK_FCALL CCTK_FNAME (CCTK_Abort) (int *ierror, cGH *GH, const int *retval);
void CCTK_FCALL CCTK_FNAME (CCTK_SyncGroup) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG);
-void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupComm) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG);
-void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupComm) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG);
-void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupStorage) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG);
-void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupStorage) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG);
+void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupComm) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG);
+void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupComm) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG);
+void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupStorage) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG);
+void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupStorage) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG);
void CCTK_FCALL CCTK_FNAME (CCTK_QueryGroupStorage) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG);
@@ -191,28 +191,28 @@ void CCTK_FCALL CCTK_FNAME (CCTK_SyncGroup) (int *ierror, cGH *GH, ONE_FORTSTRIN
free (group_name);
}
-void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupComm) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG)
+void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupComm) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE (group_name)
*ierror = CCTK_EnableGroupComm (GH, group_name);
free (group_name);
}
-void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupComm) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG)
+void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupComm) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE (group_name)
*ierror = CCTK_DisableGroupComm (GH, group_name);
free (group_name);
}
-void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupStorage) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG)
+void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupStorage) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE (group_name)
*ierror = CCTK_EnableGroupStorage (GH, group_name);
free (group_name);
}
-void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupStorage) (int *ierror, cGH *GH, ONE_FORTSTRING_ARG)
+void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupStorage) (int *ierror, const cGH *GH, ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE (group_name)
*ierror = CCTK_DisableGroupStorage (GH, group_name);