Next: bpipe_matrix_map_new, Previous: bpipe_matrix_map_dup, Up: Internal Functions
expand all NULL
matrix map entries to
create default maps
#include <bpipe/bpipe.h>BPMatrixMap *bpipe_matrix_map_expand( BPMatrix *src, BPMatrix *dst, BPMatrixMap *map );
BPMatrix *src
- source matrix spec
BPMatrix *dst
- destination matrix spec
BPMatrixMap *map
- the matrix map to expand
Matrix map structures may contain NULL
entries indicating
that default maps are to be performed. Before creating copy maps
these must be expanded. This routine will, if necessary, fill in
NULL
matrix map entries. In the case that there are
NULL
entries in the structure, a new matrix map structure
will be created and all available data duplicated. If offsets are
not provided, they are set to the origin if the matrices. If the
copied matrix extents are not provided, the extents of the largest
submatrix which can be copied are used.
If the pointer to the source matrix map is NULL
, it is
treated as if all of the matrix map entries were NULL
. in
the case that a new map is created, the old is destroyed.
The resultant map is not checked to see if it is legal.
It returns a pointer to the original matrix if nothing needed to be
expanded, else a newly created matrix map structure. The original
map is destroyed if a new is created. Upon error bpipe_errno
is set and NULL
is returned.
Upon error bpipe_errno
is set to one of the following errors:
BPEBADARG
BPENOMEM