aboutsummaryrefslogtreecommitdiff
path: root/doc/documentation.tex
diff options
context:
space:
mode:
Diffstat (limited to 'doc/documentation.tex')
-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.