aboutsummaryrefslogtreecommitdiff
path: root/src/PUGHSlab.h
diff options
context:
space:
mode:
authortradke <tradke@10716dce-81a3-4424-a2c8-48026a0d3035>2001-12-03 22:10:05 +0000
committertradke <tradke@10716dce-81a3-4424-a2c8-48026a0d3035>2001-12-03 22:10:05 +0000
commit9b7e0a9b724e4f9bd973c0b3320293eff7064227 (patch)
treefb7a748728630b27eca0a6a611c986814cde7eb1 /src/PUGHSlab.h
parent77d3ed2c0a6d387e06a798b3902ad72cef649dfb (diff)
Some small fixes for the old hyperslab API.
This is meant as preparing for the new API which should be committed soon now. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHSlab/trunk@62 10716dce-81a3-4424-a2c8-48026a0d3035
Diffstat (limited to 'src/PUGHSlab.h')
-rw-r--r--src/PUGHSlab.h65
1 files changed, 59 insertions, 6 deletions
diff --git a/src/PUGHSlab.h b/src/PUGHSlab.h
index c401602..c2ff990 100644
--- a/src/PUGHSlab.h
+++ b/src/PUGHSlab.h
@@ -1,17 +1,61 @@
/*@@
- @header Hyperslab.h
+ @header PUGHSlab.h
@date Sun 28 May 2000
@author Thomas Radke
@desc
- Function declarations of thorn Hyperslab
+ Global function declarations of thorn PUGHSlab
@enddesc
- @history
- @endhistory
+ @version $Header$
@@*/
+#ifndef _PUGHSLAB_PUGHSLAB_H_
+#define _PUGHSLAB_PUGHSLAB_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* prototype of a datatype conversion routine */
+typedef void (*t_hslabConversionFn) (const void *src,
+ void *dst,
+ CCTK_INT nelems,
+ CCTK_INT src_stride,
+ CCTK_INT dst_stride);
+
/* function prototypes */
-int Hyperslab_GetLocalHyperslab (const cGH *GH, int vindex, int vtimelvl,
+CCTK_INT Hyperslab_Get (const cGH *GH,
+ CCTK_INT mapping_handle,
+ const CCTK_INT vindex,
+ const CCTK_INT timelevel,
+ const CCTK_INT hdatatype,
+ void *hdata);
+CCTK_INT Hyperslab_GetList (const cGH *GH,
+ CCTK_INT mapping_handle,
+ CCTK_INT num_arrays,
+ const CCTK_INT *vindices /* num_arrays */,
+ const CCTK_INT *timelevels /* num_arrays */,
+ const CCTK_INT *hdatatypes /* num_arrays */,
+ void *const *hdata /* num_arrays */);
+CCTK_INT Hyperslab_DefineGlobalMappingByIndex (
+ const cGH *GH,
+ CCTK_INT vindex,
+ CCTK_INT hdim,
+ const CCTK_INT *direction /* vdim*hdim */,
+ const CCTK_INT *origin /* vdim */,
+ const CCTK_INT *extent /* hdim */,
+ const CCTK_INT *downsample /* hdim */,
+ CCTK_INT table_handle,
+ CCTK_INT target_proc,
+ t_hslabConversionFn conversion_fn,
+ CCTK_INT *hsize /* hdim */);
+CCTK_INT Hyperslab_FreeMapping (CCTK_INT mapping_handle);
+
+
+int Hyperslab_GetLocalHyperslab (const cGH *GH,
+ int vindex,
+ int vtimelvl,
int hdim,
const int global_startpoint [/*vdim*/],
const int directions [/*vdim*/],
@@ -20,10 +64,19 @@ int Hyperslab_GetLocalHyperslab (const cGH *GH, int vindex, int vtimelvl,
void **hdata,
int hsize [/*hdim*/], int ghsize [/*hdim*/],
int hoffset [/*hdim*/]);
-int Hyperslab_GetHyperslab (const cGH *GH, int target_proc, int vindex, int vtimelvl,
+int Hyperslab_GetHyperslab (const cGH *GH,
+ int target_proc,
+ int vindex,
+ int vtimelvl,
int hdim,
const int global_startpoint [/*vdim*/],
const int directions [/*vdim*/],
const int lengths [/*hdim*/],
const int downsample_ [/*hdim*/],
void **hdata, int hsize [/*hdim*/]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _PUGHSLAB_PUGHSLAB_H_ */