Next: bpipe_matrix_new_va, Previous: bpipe_matrix_max, Up: Utility Functions
create a binary pipe matrix specification
#include <bpipe/bpipe.h>BPMatrix *bpipe_matrix_new( size_t nd, size_t extent[] );
size_t nd
- the number of dimensions in the matrix
size_t extent[]
- if non
NULL
, points to an extents array to be duplicated
This routine creates a binary pipe matrix specification of a given
dimensionality. It allocates memory for the matrix structure and
its associated data. If a premade extents array is available, the
parameter extent
should point to it, and the routine will
use it as is, directing the BPipe
cleanup code to take
responsibility for freeing it. The user should not free it,
nor should it pass it to any other BPipe
routine which takes
responsibility for freeing it. If extent
is NULL
,
the extents array is initialized to all ones.
Upon successful completion a pointer to the new matrix is returned.
Upon error bpipe_errno
is set and NULL
is returned.
Upon error bpipe_errno
is set to one of the following errors:
BPEBADARG
BPENOMEM