Next: , Previous: bpipe_datatype_resolve, Up: Utility Functions


A.4.7 bpipe_extent_new

Allocate an extent array.

Synopsis

     #include <bpipe/bpipe.h>
     
     
     
void *bpipe_extent_new( size_t nd, size_t init );

Parameters

size_t nd
the number of dimensions
size_t init
the integer value of the extents

Description

Extent arrays are required by various bpipe support routines. This routine creates one and sets all of its elements to the passed value.

Returns

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.

Errors

Upon error bpipe_errno is set to one of the following errors:

BPEBADARG
the number of dimensions or the extent was less than 1
BPENOMEM
a memory allocation failed