aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@10716dce-81a3-4424-a2c8-48026a0d3035>2003-09-01 11:04:15 +0000
committertradke <tradke@10716dce-81a3-4424-a2c8-48026a0d3035>2003-09-01 11:04:15 +0000
commit6ee8d06250a1ae553afb2a825c203d831cadec5b (patch)
tree537575eb0ec6cc8d210238e11321a86935b40229
parentbf373fee247d154cb1ca6f561ae54c2c503050cd (diff)
Document the datatype conversion routine prototype.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHSlab/trunk@109 10716dce-81a3-4424-a2c8-48026a0d3035
-rw-r--r--doc/documentation.tex24
1 files changed, 14 insertions, 10 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex
index e771384..385fc48 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -244,19 +244,23 @@ CTK_INT Hyperslab_DefineLocalMappingByPhys (
For a C implementation, such a user-supplied conversion function should
be declared according to the following typedef:
\begin{verbatim}
-typedef void (*t_hslabConversionFn) (CCTK_INT nelems,
- CCTK_INT stride,
- CCTK_INT from_type,
- CCTK_INT to_type,
- const void *from,
- void *to);
+typedef CCTK_INT (*t_hslabConversionFn) (CCTK_INT nelems,
+ CCTK_INT src_stride,
+ CCTK_INT dst_stride,
+ CCTK_INT src_type,
+ CCTK_INT dst_type,
+ CCTK_POINTER_TO_CONST src,
+ CCTK_POINTER dst);
\end{verbatim}
A data type conversion function gets passed the number of elements to
- convert ({\tt nelems}), and a stride between adjacent elements
- ({\tt stride}), a pointer to the data to convert ({\tt from}), a pointer to
- the conversion target buffer ({\tt to}), and the corresponding CCTK data
- types for the data ({\tt from\_type, to\_type}).
+ convert ({\tt nelems}), the strides between adjacent elements in the
+ source and destination arrays ({\tt src\_stride, dst\_stride}),
+ the source and destination CCTK datatypes ({\tt src\_type, dst\_type}),
+ a pointer to the data to convert ({\tt src}), and a pointer to
+ the conversion target buffer ({\tt dst}).
+ The routine should return the number of elements converted ({\tt nelems})
+ for success.
If a user-supplied function is given ({\tt conversion\_fn} is not NULL),
subsequent hyperslab get/put calls will use for data type conversions.