From abaeb105276bad72c06cc1105a4b65f4b9f7907e Mon Sep 17 00:00:00 2001 From: tradke Date: Thu, 22 Jan 2004 13:31:15 +0000 Subject: Renamed some aliased hyperslab functions to comply with the maximum length for names of Fortran routines (31 characters): Hyperslab_DefineGlobalMappingByPhys -> Hyperslab_GlobalMappingByPhys Hyperslab_DefineGlobalMappingByIndex -> Hyperslab_GlobalMappingByIndex Hyperslab_DefineLocalMappingByPhys -> Hyperslab_LocalMappingByPhys Hyperslab_DefineLocalMappingByIndex -> Hyperslab_LocalMappingByIndex Also renamed the providing functions accordingly. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHSlab/trunk@119 10716dce-81a3-4424-a2c8-48026a0d3035 --- doc/documentation.tex | 24 ++++++++-------- interface.ccl | 80 +++++++++++++++++++++++++-------------------------- src/Mapping.c | 58 ++++++++++++++++++------------------- src/PUGHSlab.h | 4 +-- 4 files changed, 83 insertions(+), 83 deletions(-) diff --git a/doc/documentation.tex b/doc/documentation.tex index 0638289..1c1f70d 100644 --- a/doc/documentation.tex +++ b/doc/documentation.tex @@ -65,10 +65,10 @@ In general, a hyperslab get/put operation is done in a three-level scheme: \item In a first step, a hyperslab mapping is defined by calling one of the following routines:\\ {\tt - \hspace*{3ex}Hyperslab\_DefineLocalMappingByIndex()\\ - \hspace*{3ex}Hyperslab\_DefineLocalMappingByPhys()\\ - \hspace*{3ex}Hyperslab\_DefineGlobalMappingByIndex()\\ - \hspace*{3ex}Hyperslab\_DefineGlobalMappingByPhys()\\ + \hspace*{3ex}Hyperslab\_LocalMappingByIndex()\\ + \hspace*{3ex}Hyperslab\_LocalMappingByPhys()\\ + \hspace*{3ex}Hyperslab\_GlobalMappingByIndex()\\ + \hspace*{3ex}Hyperslab\_GlobalMappingByPhys()\\ } There exists two complement sets of routines: one for the definition of local hyperslabs (which apply to a processor's local patch of a distributed @@ -109,7 +109,7 @@ can be specified either by coordinates on the physical grid or by index points on the underlying computational grid. \begin{verbatim} -CCTK_INT Hyperslab_DefineGlobalMappingByIndex ( +CCTK_INT Hyperslab_GlobalMappingByIndex ( CCTK_POINTER_TO_CONST GH, CCTK_INT vindex, CCTK_INT hdim, @@ -121,7 +121,7 @@ CCTK_INT Hyperslab_DefineGlobalMappingByIndex ( CCTK_FPOINTER conversion_fn, CCTK_INT *hsize /* hdim */); -CCTK_INT Hyperslab_DefineGlobalMappingByPhys ( +CCTK_INT Hyperslab_GlobalMappingByPhys ( CCTK_POINTER_TO_CONST GH, CCTK_INT vindex, CCTK_INT hdim, @@ -135,7 +135,7 @@ CCTK_INT Hyperslab_DefineGlobalMappingByPhys ( CCTK_INT *hsize /* hdim */); -CCTK_INT Hyperslab_DefineLocalMappingByIndex ( +CCTK_INT Hyperslab_LocalMappingByIndex ( CCTK_POINTER_TO_CONST GH, CCTK_INT vindex, CCTK_INT hdim, @@ -149,7 +149,7 @@ CCTK_INT Hyperslab_DefineLocalMappingByIndex ( CCTK_INT *hsize_global, /* hdim */ CCTK_INT *hoffset_global /* hdim */); -CTK_INT Hyperslab_DefineLocalMappingByPhys ( +CTK_INT Hyperslab_LocalMappingByPhys ( CCTK_POINTER_TO_CONST GH, CCTK_INT vindex, CCTK_INT hdim, @@ -270,7 +270,7 @@ typedef CCTK_INT (*t_hslabConversionFn) (CCTK_INT nelems, \item{\tt CCTK\_INT *hsize\\ CCTK\_INT *hsize\_local}\\ Reference to a size array with {\tt hdim} elements to be set by the - {\tt Hyperslab\_DefineXXXMappingByXXX()} routines. + {\tt Hyperslab\_XXXMappingByXXX()} routines. The resulting size of the hyperslab to be extracted is set according to the hyperslab extents and downsampling parameters chosen. @@ -280,7 +280,7 @@ typedef CCTK_INT (*t_hslabConversionFn) (CCTK_INT nelems, \item{\tt CCTK\_INT *hsize\_global}\\ Reference to a size array with {\tt hdim} elements to be set by the - {\tt Hyperslab\_DefineLocalMappingBy*()} routine. + {\tt Hyperslab\_LocalMappingBy*()} routine. This array holds the sizes of the corresponding global hyperslab. It is set according to the local hyperslab extents and downsampling @@ -291,7 +291,7 @@ typedef CCTK_INT (*t_hslabConversionFn) (CCTK_INT nelems, \item{\tt CCTK\_INT *hoffset\_global}\\ Reference to an offset array with {\tt hdim} elements to be set by the - {\tt Hyperslab\_DefineLocalMappingBy*()} routine. + {\tt Hyperslab\_LocalMappingBy*()} routine. This array holds the offsets of the local hyperslab into the corresponding global hyperslab. It is set according to the local @@ -306,7 +306,7 @@ typedef CCTK_INT (*t_hslabConversionFn) (CCTK_INT nelems, \begin{itemize} \item 0 for success \item negative for some error condition (to be defined by an actual - implementation of the {\tt Hyperslab\_Define*MappingBy*()} routines) + implementation of the {\tt Hyperslab\_*MappingBy*()} routines) \end{itemize} diff --git a/interface.ccl b/interface.ccl index 5f8ad29..81c161e 100644 --- a/interface.ccl +++ b/interface.ccl @@ -25,44 +25,44 @@ CCTK_INT FUNCTION \ CCTK_INT ARRAY OUT retvals) CCTK_INT FUNCTION \ - Hyperslab_DefineLocalMappingByIndex (CCTK_POINTER_TO_CONST IN cctkGH, \ - CCTK_INT IN vindex, \ - CCTK_INT IN hdim, \ - CCTK_INT ARRAY IN direction, \ - CCTK_INT ARRAY IN origin, \ - CCTK_INT ARRAY IN extent, \ - CCTK_INT ARRAY IN downsample, \ - CCTK_INT IN table_handle, \ - CCTK_INT CCTK_FPOINTER IN \ - conversion_fn (CCTK_INT IN nelems, \ - CCTK_INT IN src_stride, \ - CCTK_INT IN dst_stride, \ - CCTK_INT IN src_type, \ - CCTK_INT IN dst_type, \ - CCTK_POINTER_TO_CONST IN from, \ - CCTK_POINTER IN to), \ - CCTK_INT ARRAY OUT hsize_local, \ - CCTK_INT ARRAY OUT hsize_global, \ - CCTK_INT ARRAY OUT hoffset_global) + Hyperslab_LocalMappingByIndex (CCTK_POINTER_TO_CONST IN cctkGH, \ + CCTK_INT IN vindex, \ + CCTK_INT IN hdim, \ + CCTK_INT ARRAY IN direction, \ + CCTK_INT ARRAY IN origin, \ + CCTK_INT ARRAY IN extent, \ + CCTK_INT ARRAY IN downsample, \ + CCTK_INT IN table_handle, \ + CCTK_INT CCTK_FPOINTER IN \ + conversion_fn (CCTK_INT IN nelems, \ + CCTK_INT IN src_stride, \ + CCTK_INT IN dst_stride, \ + CCTK_INT IN src_type, \ + CCTK_INT IN dst_type, \ + CCTK_POINTER_TO_CONST IN from, \ + CCTK_POINTER IN to), \ + CCTK_INT ARRAY OUT hsize_local, \ + CCTK_INT ARRAY OUT hsize_global, \ + CCTK_INT ARRAY OUT hoffset_global) CCTK_INT FUNCTION \ - Hyperslab_DefineGlobalMappingByIndex (CCTK_POINTER_TO_CONST IN cctkGH, \ - CCTK_INT IN vindex, \ - CCTK_INT IN hdim, \ - CCTK_INT ARRAY IN direction, \ - CCTK_INT ARRAY IN origin, \ - CCTK_INT ARRAY IN extent, \ - CCTK_INT ARRAY IN downsample, \ - CCTK_INT IN table_handle, \ - CCTK_INT CCTK_FPOINTER IN \ - conversion_fn (CCTK_INT IN nelems, \ - CCTK_INT IN src_stride, \ - CCTK_INT IN dst_stride, \ - CCTK_INT IN src_type, \ - CCTK_INT IN dst_type, \ - CCTK_POINTER_TO_CONST IN from, \ - CCTK_POINTER IN to), \ - CCTK_INT ARRAY OUT hsize) + Hyperslab_GlobalMappingByIndex (CCTK_POINTER_TO_CONST IN cctkGH, \ + CCTK_INT IN vindex, \ + CCTK_INT IN hdim, \ + CCTK_INT ARRAY IN direction, \ + CCTK_INT ARRAY IN origin, \ + CCTK_INT ARRAY IN extent, \ + CCTK_INT ARRAY IN downsample, \ + CCTK_INT IN table_handle, \ + CCTK_INT CCTK_FPOINTER IN \ + conversion_fn (CCTK_INT IN nelems, \ + CCTK_INT IN src_stride, \ + CCTK_INT IN dst_stride, \ + CCTK_INT IN src_type, \ + CCTK_INT IN dst_type, \ + CCTK_POINTER_TO_CONST IN from, \ + CCTK_POINTER IN to), \ + CCTK_INT ARRAY OUT hsize) CCTK_INT FUNCTION Hyperslab_FreeMapping (CCTK_INT IN mapping_handle) @@ -71,10 +71,10 @@ PROVIDES FUNCTION Hyperslab_Get \ WITH PUGHSlab_Get LANGUAGE C PROVIDES FUNCTION Hyperslab_GetList \ WITH PUGHSlab_GetList LANGUAGE C -PROVIDES FUNCTION Hyperslab_DefineGlobalMappingByIndex \ - WITH PUGHSlab_DefineGlobalMappingByIndex LANGUAGE C -PROVIDES FUNCTION Hyperslab_DefineLocalMappingByIndex \ - WITH PUGHSlab_DefineLocalMappingByIndex LANGUAGE C +PROVIDES FUNCTION Hyperslab_GlobalMappingByIndex \ + WITH PUGHSlab_GlobalMappingByIndex LANGUAGE C +PROVIDES FUNCTION Hyperslab_LocalMappingByIndex \ + WITH PUGHSlab_LocalMappingByIndex LANGUAGE C PROVIDES FUNCTION Hyperslab_FreeMapping \ WITH PUGHSlab_FreeMapping LANGUAGE C diff --git a/src/Mapping.c b/src/Mapping.c index 4cd0c94..386f897 100644 --- a/src/Mapping.c +++ b/src/Mapping.c @@ -70,18 +70,18 @@ static int IsFullHyperslab (const pGA *GA, const hslab_mapping_t *mapping); -CCTK_INT PUGHSlab_DefineLocalMappingByIndex (CCTK_POINTER_TO_CONST _GH, - CCTK_INT vindex, - CCTK_INT hdim, - const CCTK_INT *direction, - const CCTK_INT *origin, - const CCTK_INT *extent, - const CCTK_INT *downsample, - CCTK_INT table_handle, - t_hslabConversionFn function, - CCTK_INT *hsize_local, - CCTK_INT *hsize_global, - CCTK_INT *hoffset_global) +CCTK_INT PUGHSlab_LocalMappingByIndex (CCTK_POINTER_TO_CONST _GH, + CCTK_INT vindex, + CCTK_INT hdim, + const CCTK_INT *direction, + const CCTK_INT *origin, + const CCTK_INT *extent, + const CCTK_INT *downsample, + CCTK_INT table_handle, + t_hslabConversionFn function, + CCTK_INT *hsize_local, + CCTK_INT *hsize_global, + CCTK_INT *hoffset_global) { CCTK_INT retval; const cGH *GH = _GH; @@ -94,16 +94,16 @@ CCTK_INT PUGHSlab_DefineLocalMappingByIndex (CCTK_POINTER_TO_CONST _GH, } -CCTK_INT PUGHSlab_DefineGlobalMappingByIndex (CCTK_POINTER_TO_CONST _GH, - CCTK_INT vindex, - CCTK_INT hdim, - const CCTK_INT *direction, - const CCTK_INT *origin, - const CCTK_INT *extent, - const CCTK_INT *downsample, - CCTK_INT table_handle, - t_hslabConversionFn function, - CCTK_INT *hsize) +CCTK_INT PUGHSlab_GlobalMappingByIndex (CCTK_POINTER_TO_CONST _GH, + CCTK_INT vindex, + CCTK_INT hdim, + const CCTK_INT *direction, + const CCTK_INT *origin, + const CCTK_INT *extent, + const CCTK_INT *downsample, + CCTK_INT table_handle, + t_hslabConversionFn function, + CCTK_INT *hsize) { CCTK_INT retval; const cGH *GH = _GH; @@ -277,7 +277,7 @@ static CCTK_INT DefineMapping (const cGH *GH, if (retval) { CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "PUGHlab_DefineGlobalMappingByIndex: %s", error_msg); + "PUGHlab_GlobalMappingByIndex: %s", error_msg); return (retval); } @@ -313,7 +313,7 @@ static CCTK_INT DefineMapping (const cGH *GH, { free (mapping->do_dir); free (mapping->global_hsize); free (mapping); CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "PUGHlab_DefineGlobalMappingByIndex: %d-direction vector " + "PUGHlab_GlobalMappingByIndex: %d-direction vector " "is a null vector", dim); return (-7); } @@ -323,7 +323,7 @@ static CCTK_INT DefineMapping (const cGH *GH, { free (mapping->do_dir); free (mapping->global_hsize); free (mapping); CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "PUGHlab_DefineGlobalMappingByIndex: %d-direction vector " + "PUGHlab_GlobalMappingByIndex: %d-direction vector " "isn't axis-orthogonal", dim); return (-7); } @@ -334,7 +334,7 @@ static CCTK_INT DefineMapping (const cGH *GH, { free (mapping->do_dir); free (mapping->global_hsize); free (mapping); CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "PUGHlab_DefineGlobalMappingByIndex: diagonals can be " + "PUGHlab_GlobalMappingByIndex: diagonals can be " "extracted from non-staggered 3D variables only"); return (-7); } @@ -352,7 +352,7 @@ static CCTK_INT DefineMapping (const cGH *GH, if (mapping->do_dir[vdim] > 1) { free (mapping->do_dir); free (mapping->global_hsize); free (mapping); - CCTK_WARN (1, "PUGHlab_DefineGlobalMappingByIndex: duplicate direction " + CCTK_WARN (1, "PUGHlab_GlobalMappingByIndex: duplicate direction " "vectors given"); return (-8); } @@ -371,7 +371,7 @@ static CCTK_INT DefineMapping (const cGH *GH, { free (mapping->do_dir); free (mapping->global_hsize); free (mapping); CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "PUGHlab_DefineGlobalMappingByIndex: extent in " + "PUGHlab_GlobalMappingByIndex: extent in " "%d-direction exceeds grid size", dim); return (-8); } @@ -382,7 +382,7 @@ static CCTK_INT DefineMapping (const cGH *GH, { free (mapping->do_dir); free (mapping->global_hsize); free (mapping); CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "PUGHlab_DefineGlobalMappingByIndex: extent in " + "PUGHlab_GlobalMappingByIndex: extent in " "%d-direction exceeds grid size", vdim); return (-8); } diff --git a/src/PUGHSlab.h b/src/PUGHSlab.h index 5a562e0..72833d3 100644 --- a/src/PUGHSlab.h +++ b/src/PUGHSlab.h @@ -43,7 +43,7 @@ CCTK_INT PUGHSlab_GetList (CCTK_POINTER_TO_CONST _GH, const CCTK_INT *hdatatypes, /* num_arrays */ const CCTK_POINTER *hdata, /* num_arrays */ CCTK_INT *retvals /* num_arrays */); -CCTK_INT PUGHSlab_DefineLocalMappingByIndex ( +CCTK_INT PUGHSlab_LocalMappingByIndex ( CCTK_POINTER_TO_CONST _GH, CCTK_INT vindex, CCTK_INT hdim, @@ -57,7 +57,7 @@ CCTK_INT PUGHSlab_DefineLocalMappingByIndex ( CCTK_INT *hsize_global, /* hdim */ CCTK_INT *hoffset_global /* hdim */); -CCTK_INT PUGHSlab_DefineGlobalMappingByIndex ( +CCTK_INT PUGHSlab_GlobalMappingByIndex ( CCTK_POINTER_TO_CONST _GH, CCTK_INT vindex, CCTK_INT hdim, -- cgit v1.2.3