diff options
author | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2001-11-05 15:12:03 +0000 |
---|---|---|
committer | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2001-11-05 15:12:03 +0000 |
commit | 4a477a2c7ccf32f0c56a2e1348217ef67bdae0cb (patch) | |
tree | 97bb2f125823efac6e93a24f0afe52e58f1e3126 /src/DumpVar.c | |
parent | ce402fb886c3764cb3594fbf1272bab7070de89e (diff) |
Added const qualifier to the 'cGH *' argument of some more IO functions.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@44 7842ec3a-9562-4be5-9c5b-06ba18f2b668
Diffstat (limited to 'src/DumpVar.c')
-rw-r--r-- | src/DumpVar.c | 112 |
1 files changed, 68 insertions, 44 deletions
diff --git a/src/DumpVar.c b/src/DumpVar.c index 9f31438..a2f9a21 100644 --- a/src/DumpVar.c +++ b/src/DumpVar.c @@ -41,45 +41,45 @@ typedef struct /* prototypes of routines defined in this source file */ -static int IOHDF5Util_DumpGS (cGH *GH, +static int IOHDF5Util_DumpGS (const cGH *GH, int vindex, int timelevel, int iohdf5_type, - ioHDF5Geo_t *request, + const ioHDF5Geo_t *request, int check_exisiting_objects, hid_t file); -static int IOHDF5Util_DumpGA (cGH *GH, +static int IOHDF5Util_DumpGA (const cGH *GH, int vindex, int timelevel, - ioHDF5Geo_t *request, - dumpInfo *info, + const ioHDF5Geo_t *request, + const dumpInfo *info, int check_exisiting_objects, hid_t file); -static int IOHDF5Util_getDumpData (cGH *GH, +static int IOHDF5Util_getDumpData (const cGH *GH, int vindex, int timelevel, - ioHDF5Geo_t *request, + const ioHDF5Geo_t *request, void **outme, int *free_outme, CCTK_INT *geom); -static void IOHDF5Util_procDump (cGH *GH, +static void IOHDF5Util_procDump (const cGH *GH, int vindex, int timelevel, - ioHDF5Geo_t *request, - void *outme, - CCTK_INT *geom, + const ioHDF5Geo_t *request, + const void *outme, + const CCTK_INT *geom, int proc, int iohdf5_type, int check_exisiting_objects, hid_t file); #ifdef CCTK_MPI #ifdef HAVE_PARALLEL -static void IOHDF5Util_collectiveDump (cGH *GH, +static void IOHDF5Util_collectiveDump (const cGH *GH, int vindex, int timelevel, - ioHDF5Geo_t *request, - void *outme, - CCTK_INT *geom, + const ioHDF5Geo_t *request, + const void *outme, + const CCTK_INT *geom, int hdf5io_type, hid_t file); #endif /* HAVE_PARALLEL */ @@ -100,7 +100,7 @@ static void IOHDF5Util_collectiveDump (cGH *GH, @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH * + @vtype const cGH * @vio in @endvar @var vindex @@ -115,7 +115,7 @@ static void IOHDF5Util_collectiveDump (cGH *GH, @endvar @var request @vdesc pointer to the IO request structure - @vtype ioHDF5Geo_t * + @vtype const ioHDF5Geo_t * @vio in @endvar @var file @@ -139,10 +139,10 @@ static void IOHDF5Util_collectiveDump (cGH *GH, @seeroutine IOHDF5Util_DumpGA @endreturndesc @@*/ -int IOHDF5Util_DumpVar (cGH *GH, +int IOHDF5Util_DumpVar (const cGH *GH, int vindex, int timelevel, - ioHDF5Geo_t *request, + const ioHDF5Geo_t *request, hid_t file, int check_exisiting_objects) { @@ -230,7 +230,7 @@ int IOHDF5Util_DumpVar (cGH *GH, @enddesc @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH + @vtype const cGH * @vio in @endvar @var vindex @@ -250,7 +250,7 @@ int IOHDF5Util_DumpVar (cGH *GH, @endvar @var request @vdesc pointer to the IO request structure - @vtype ioHDF5Geo_t * + @vtype const ioHDF5Geo_t * @vio in @endvar @var check_exisiting_objects @@ -271,11 +271,11 @@ int IOHDF5Util_DumpVar (cGH *GH, always 0 @endreturndesc @@*/ -static int IOHDF5Util_DumpGS (cGH *GH, +static int IOHDF5Util_DumpGS (const cGH *GH, int vindex, int timelevel, int iohdf5_type, - ioHDF5Geo_t *request, + const ioHDF5Geo_t *request, int check_exisiting_objects, hid_t file) { @@ -341,7 +341,7 @@ static int IOHDF5Util_DumpGS (cGH *GH, @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH + @vtype const cGH * @vio in @endvar @var vindex @@ -356,7 +356,7 @@ static int IOHDF5Util_DumpGS (cGH *GH, @endvar @var request @vdesc pointer to the IO request structure - @vtype ioHDF5Geo_t * + @vtype const ioHDF5Geo_t * @vio in @endvar @var info @@ -364,7 +364,7 @@ static int IOHDF5Util_DumpGS (cGH *GH, - the HDF5 datatype to store - the size of an element of variable - the MPI datatype to communicate - @vtype dumpInfo + @vtype const dumpInfo * @vio in @endvar @var check_exisiting_objects @@ -386,11 +386,11 @@ static int IOHDF5Util_DumpGS (cGH *GH, or returncode of @seeroutine IOHDF5Util_getDumpData @endreturndesc @@*/ -static int IOHDF5Util_DumpGA (cGH *GH, +static int IOHDF5Util_DumpGA (const cGH *GH, int vindex, int timelevel, - ioHDF5Geo_t *request, - dumpInfo *info, + const ioHDF5Geo_t *request, + const dumpInfo *info, int check_exisiting_objects, hid_t file) { @@ -532,10 +532,10 @@ static int IOHDF5Util_DumpGA (cGH *GH, /**************************************************************************/ /* local functions */ /**************************************************************************/ -static int IOHDF5Util_getDumpData (cGH *GH, +static int IOHDF5Util_getDumpData (const cGH *GH, int vindex, int timelevel, - ioHDF5Geo_t *request, + const ioHDF5Geo_t *request, void **outme, int *free_outme, CCTK_INT *geom) @@ -639,7 +639,7 @@ static int IOHDF5Util_getDumpData (cGH *GH, @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH * + @vtype const cGH * @vio in @endvar @var vindex @@ -652,14 +652,19 @@ static int IOHDF5Util_getDumpData (cGH *GH, @vtype int @vio in @endvar + @var request + @vdesc pointer to the IO request structure + @vtype const ioHDF5Geo_t * + @vio in + @endvar @var outme @vdesc pointer to the chunk to dump - @vtype void * + @vtype const void * @vio in @endvar @var geom @vdesc bounds and sizes of the output - @vtype CCTK_INT[3*dim] + @vtype const CCTK_INT[3*dim] @vio in @vcomment geom[0*dim..1*dim-1]: lower bounds geom[1*dim..2*dim-1]: (local) data sizes @@ -675,18 +680,25 @@ static int IOHDF5Util_getDumpData (cGH *GH, @vtype int @vio in @endvar + @var check_exisiting_objects + @vdesc flag indicating if we should check for already existing objects + before these are created anew + This might happen for existing files reopened after recovery. + @vtype int + @vio in + @endvar @var file @vdesc the HDF5 file handle @vtype hid_t @vio in @endvar @@*/ -static void IOHDF5Util_procDump (cGH *GH, +static void IOHDF5Util_procDump (const cGH *GH, int vindex, int timelevel, - ioHDF5Geo_t *request, - void *outme, - CCTK_INT *geom, + const ioHDF5Geo_t *request, + const void *outme, + const CCTK_INT *geom, int proc, int iohdf5_type, int check_exisiting_objects, @@ -843,7 +855,7 @@ static void IOHDF5Util_procDump (cGH *GH, @var GH @vdesc Pointer to CCTK grid hierarchy - @vtype cGH * + @vtype const cGH * @vio in @endvar @var vindex @@ -856,14 +868,19 @@ static void IOHDF5Util_procDump (cGH *GH, @vtype int @vio in @endvar + @var request + @vdesc pointer to the IO request structure + @vtype const ioHDF5Geo_t * + @vio in + @endvar @var outme @vdesc pointer to the chunk to dump - @vtype void * + @vtype const void * @vio in @endvar @var geom @vdesc bounds and sizes of the output - @vtype CCTK_INT[3*dim] + @vtype const CCTK_INT[3*dim] @vio in @vcomment geom[0*dim..1*dim-1]: lower bounds geom[1*dim..2*dim-1]: (local) data sizes @@ -874,17 +891,24 @@ static void IOHDF5Util_procDump (cGH *GH, @vtype int @vio in @endvar + @var check_exisiting_objects + @vdesc flag indicating if we should check for already existing objects + before these are created anew + This might happen for existing files reopened after recovery. + @vtype int + @vio in + @endvar @var file @vdesc the HDF5 file handle @vtype hid_t @vio in @endvar @@*/ -static void IOHDF5Util_collectiveDump (cGH *GH, +static void IOHDF5Util_collectiveDump (const cGH *GH, int vindex, int timelevel, - ioHDF5Geo_t *request, - void *outme, + const ioHDF5Geo_t *request, + const void *outme, CCTK_INT *geom, int hdf5io_type, hid_t file) |