Next: bpipe_offset_new_va, Previous: bpipe_memfill, Up: Utility Functions
Allocate an offset array.
#include <bpipe/bpipe.h>size_t *bpipe_offset_new( size_t nd, size_t init );
size_t nd
- the number of dimensions
size_t init
- the value to initialize the offsets to
Offset arrays are required by various bpipe
support routines.
This routine makes it easy to allocate one. It creates an
offset array with all offsets set to a passed value.
It returns a pointer to an array of integers, filled in with
the specified value. Upon error bpipe_errno
is set and
NULL
is returned.
Upon error bpipe_errno
is set to one of the following errors:
BPEBADARG
BPENOMEM