Next: , Previous: bpipe_extent_new_va, Up: Utility Functions   [Contents]


A.4.9 bpipe_matrix_crunch

remove all singleton dimensions

Synopsis

#include <bpipe/bpipe.h>

BPMatrix *bpipe_matrix_crunch(BPMatrix *matrix);

Parameters

BPMatrix *matrix

Not Documented.

Description

This routine returns a copy of the passed matrix with all dimensions of extent one removed. For example, ‘[1][2][1]’ becomes ‘[2]’.

Returns

Upon successful completion a pointer to the new matrix is returned. Upon error bpipe_errno is set and NULL is returned.

Errors

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

BPENOMEM

a memory allocation failed