Next: bpipe_datatype_init_output, Previous: bpipe_check_matrix_copy, Up: Internal Functions
call a copy function with offsets for a data type's atomic elements
#include <bpipe/bpipe.h>int bpipe_datatype_copy( size_t dst, size_t src, size_t nobjs, BPDataType type, BPXMap map, void *udata, int (*copy)(void *,size_t,size_t,size_t) );
size_t dst
- starting destination offset
size_t src
- starting source offset
size_t nobjs
- number of data objects to copy
BPDataType type
- type of the data
Possible values for aBPDataType
are as follows:BPDType_char
,BPDType_double
,BPDType_int
,BPDType_uint
,BPDType_DVector2
,BPDType_DVector3
,BPDType_IVector2
,BPDType_IVector3
,BPDType_UIVector2
,BPDType_UIVector3
,BPDType_DComplex
,BPDType_DCVector2
,BPDType_DCVector3
BPXMap map
- what type of mapping
Possible values for aBPXMap
are as follows:BPXMap_Input_to_Core
,BPXMap_Core_to_Output
,BPXMap_Core_to_Core
void *udata
- copy routine specific data
int (*copy)(void *,size_t,size_t,size_t)
- a function to copy the data
bpipe_datatype_copy
issues copy commands to copy the
elements in a data type without inter-element padding. A routine
must be provided with an interface similar to memcpy
which
will do the actual copying of data. It assumes that all of the
passed arguments are correct.
It returns zero upon success, non-zero if a copy operation returned failure.