diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-11-05 14:58:55 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-11-05 14:58:55 +0000 |
commit | 7429addb5b7f80c1035b59afa239996ff1a58c65 (patch) | |
tree | 1ba6dde297325a705161420eacd2a2151db10fa5 /src/comm/OverloadComm.c | |
parent | 295247798ad3e1ef841ac7e04d219ac3cb146e8b (diff) |
Adding a const qualifier to the 'cGH *' argument of some flesh routines
and for I/O method registration.
You will also need to update the I/O thorns which I will commit changes to now.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2452 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/comm/OverloadComm.c')
-rw-r--r-- | src/comm/OverloadComm.c | 108 |
1 files changed, 55 insertions, 53 deletions
diff --git a/src/comm/OverloadComm.c b/src/comm/OverloadComm.c index 9b5d6fbc..9d0b80da 100644 --- a/src/comm/OverloadComm.c +++ b/src/comm/OverloadComm.c @@ -2,27 +2,27 @@ @file Overload.c @date Wed Feb 3 23:27:18 1999 @author Tom Goodale - @desc - Contains routines to overload the communication functions. - Uses the overload macros to make sure of consistency and - to save typing ! - @enddesc + @desc + Contains routines to overload the communication functions. + Uses the overload macros to make sure of consistency and + to save typing ! + @enddesc + @version $Id$ @@*/ #include <stdio.h> #include <stdlib.h> -#include <stdarg.h> -#include <string.h> #include "cctk_Flesh.h" #include "cctk_FortranString.h" -#include "OverloadMacros.h" #include "cctk_WarnLevel.h" +#include "CactusRegister.h" +#include "OverloadMacros.h" -static const char *rcsid="$Header$"; - +static const char *rcsid = "$Header$"; CCTK_FILEVERSION(comm_OverloadComm_c) + /* Define the prototypes for the dummy functions. */ #define OVERLOADABLE(name) OVERLOADABLE_DUMMYPROTOTYPE(name) @@ -107,74 +107,76 @@ int CCTKi_SetupCommFunctions(void) -/* Fortran bindings for the comm functions */ - +/* Fortran bindings prototypes for the comm functions */ +int CCTK_FCALL CCTK_FNAME (CCTK_nProcs) (const cGH *GH); +int CCTK_FCALL CCTK_FNAME (CCTK_MyProc) (const cGH *GH); +void CCTK_FCALL CCTK_FNAME (CCTK_Barrier) (int *ierr, const cGH *GH); +void CCTK_FCALL CCTK_FNAME (CCTK_Exit) (int *ierr, cGH *GH, const int *retval); +void CCTK_FCALL CCTK_FNAME (CCTK_Abort) (int *ierr, cGH *GH, const int *retval); +void CCTK_FCALL CCTK_FNAME (CCTK_SyncGroup) (int *ierr, cGH *GH, ONE_FORTSTRING_ARG); +void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupComm) (int *ierr, cGH *GH, ONE_FORTSTRING_ARG); +void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupComm) (int *ierr, cGH *GH, ONE_FORTSTRING_ARG); +void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupStorage) (int *ierr, cGH *GH, ONE_FORTSTRING_ARG); +void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupStorage) (int *ierr, cGH *GH, ONE_FORTSTRING_ARG); -int CCTK_FCALL CCTK_FNAME(CCTK_Exit)(cGH *GH, int *retval) +/* Fortran bindings definitions for the comm functions */ +int CCTK_FCALL CCTK_FNAME (CCTK_nProcs) (const cGH *GH) { - return CCTK_Exit(GH, *retval); + return (CCTK_nProcs (GH)); } - -int CCTK_FCALL CCTK_FNAME(CCTK_ParallelInit)(cGH *GH) + +int CCTK_FCALL CCTK_FNAME (CCTK_MyProc) (const cGH *GH) { - return CCTK_ParallelInit(GH); + return (CCTK_MyProc (GH)); } - -int CCTK_FCALL CCTK_FNAME(CCTK_Abort)(cGH *GH, int *retval) + +void CCTK_FCALL CCTK_FNAME (CCTK_Barrier) (int *ierr, const cGH *GH) { - CCTK_Abort(GH, *retval); - return 0; + *ierr = CCTK_Barrier (GH); } -int CCTK_FCALL CCTK_FNAME(CCTK_SyncGroup)(cGH *GH, ONE_FORTSTRING_ARG) +void CCTK_FCALL CCTK_FNAME (CCTK_Exit) (int *ierr, cGH *GH, const int *retval) { - ONE_FORTSTRING_CREATE(group_name) - CCTK_SyncGroup(GH,group_name); - free(group_name); - return 0; + *ierr = CCTK_Exit (GH, *retval); } -void CCTK_FCALL CCTK_FNAME(CCTK_EnableGroupComm)(int *ierr, cGH *GH, ONE_FORTSTRING_ARG) +void CCTK_FCALL CCTK_FNAME (CCTK_Abort) (int *ierr, cGH *GH, const int *retval) { - ONE_FORTSTRING_CREATE(group_name) - *ierr = CCTK_EnableGroupComm(GH, group_name); - free(group_name); + *ierr = CCTK_Abort (GH, *retval); } -void CCTK_FCALL CCTK_FNAME(CCTK_DisableGroupComm)(int *ierr, cGH *GH, ONE_FORTSTRING_ARG) +void CCTK_FCALL CCTK_FNAME (CCTK_SyncGroup) (int *ierr, cGH *GH, ONE_FORTSTRING_ARG) { - ONE_FORTSTRING_CREATE(group_name) - *ierr = CCTK_DisableGroupComm(GH, group_name); - free(group_name); + ONE_FORTSTRING_CREATE (group_name) + *ierr = CCTK_SyncGroup (GH, group_name); + free (group_name); } -void CCTK_FCALL CCTK_FNAME(CCTK_EnableGroupStorage)(int *ierr, cGH *GH, ONE_FORTSTRING_ARG) +void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupComm) (int *ierr, cGH *GH, ONE_FORTSTRING_ARG) { - ONE_FORTSTRING_CREATE(group_name) - *ierr = CCTK_EnableGroupStorage(GH, group_name); - free(group_name); + ONE_FORTSTRING_CREATE (group_name) + *ierr = CCTK_EnableGroupComm (GH, group_name); + free (group_name); } -void CCTK_FCALL CCTK_FNAME(CCTK_DisableGroupStorage)(int *ierr, cGH *GH, ONE_FORTSTRING_ARG) +void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupComm) (int *ierr, cGH *GH, ONE_FORTSTRING_ARG) { - ONE_FORTSTRING_CREATE(group_name) - *ierr = CCTK_DisableGroupStorage(GH, group_name); - free(group_name); + ONE_FORTSTRING_CREATE (group_name) + *ierr = CCTK_DisableGroupComm (GH, group_name); + free (group_name); } -int CCTK_FCALL CCTK_FNAME(CCTK_nProcs)(const cGH *GH) +void CCTK_FCALL CCTK_FNAME (CCTK_EnableGroupStorage) (int *ierr, cGH *GH, ONE_FORTSTRING_ARG) { - return CCTK_nProcs(GH); + ONE_FORTSTRING_CREATE (group_name) + *ierr = CCTK_EnableGroupStorage (GH, group_name); + free (group_name); } - -int CCTK_FCALL CCTK_FNAME(CCTK_MyProc)(const cGH *GH) -{ - return CCTK_MyProc(GH); -} - -int CCTK_FCALL CCTK_FNAME(CCTK_Barrier)(const cGH *GH) + +void CCTK_FCALL CCTK_FNAME (CCTK_DisableGroupStorage) (int *ierr, cGH *GH, ONE_FORTSTRING_ARG) { - return CCTK_Barrier(GH); + ONE_FORTSTRING_CREATE (group_name) + *ierr = CCTK_DisableGroupStorage (GH, group_name); + free (group_name); } - |