diff options
Diffstat (limited to 'src/ioutil_Utils.h')
-rw-r--r-- | src/ioutil_Utils.h | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/src/ioutil_Utils.h b/src/ioutil_Utils.h index 519f6ee..83831dc 100644 --- a/src/ioutil_Utils.h +++ b/src/ioutil_Utils.h @@ -4,13 +4,12 @@ @author Thomas Radke @desc Function prototypes for setting up slice centers. - @history - @endhistory - @version $Header$ + @enddesc + @version $Header$ @@*/ -#ifndef _IOUTIL_UTILS_H_ -#define _IOUTIL_UTILS_H_ +#ifndef _IOUTIL_IOUTIL_UTILS_H_ +#define _IOUTIL_IOUTIL_UTILS_H_ 1 #ifdef __cplusplus extern "C" @@ -18,6 +17,44 @@ extern "C" #endif +/* structure describing an I/O request (including hyperslab parameters) */ +typedef struct +{ + /* index and timelevel of the variable */ + int vindex, timelevel; + + /* dimensionality of the variable and the hyperslab */ + int vdim, hdim; + + /* CCTK datatype for the hyperslab */ + int hdatatype; + + /* flag indicating wheter check whether an object to be written already + exists (and remove it in that case) */ + int check_exist; + + /* pointer to allocated buffers */ + CCTK_INT *vectors; + + /* hyperslab mapping parameters */ + CCTK_INT *origin, *direction, *extent, *downsample; + + /* offset and sizes of hyperslab into the variable's dataspace */ + CCTK_INT *hoffset, *hsize, *hsize_chunk; + +} ioRequest; + + +/* parse a given 'out_vars' parameter string */ +void IOUtil_ParseVarsForOutput (const cGH *GH, const char *out_vars, + ioRequest *request_list[]); + +/* return the default I/O request description structure for a variable */ +ioRequest *IOUtil_DefaultIORequest (const cGH *GH, int vindex); + +/* free an I/O request description */ +void IOUtil_FreeIORequest (ioRequest **request); + /* set the slice center for 1D lines */ int IOUtil_1DLines (const cGH *GH, int num_dims, @@ -32,6 +69,7 @@ int IOUtil_2DPlanes (const cGH *GH, const CCTK_REAL *origin_phys, int *slice_center); +/* create an output directory on all I/O processors */ int IOUtil_CreateDirectory (const cGH *GH, const char *dirname, int multiple_io_procs, @@ -41,4 +79,4 @@ int IOUtil_CreateDirectory (const cGH *GH, } #endif -#endif /* _IOUTIL_UTILS_H_ */ +#endif /* _IOUTIL_IOUTIL_UTILS_H_ */ |