Modify number of dimensions and size of each dimension
#include "gpu/mxGPUArray.h" void mxGPUSetDimensions(mxGPUArray * const mgp, mwSize const * const dims, mwSize const ndims);
mgp
Pointer to an mxGPUArray
dims
Dimensions array. Each element in the dimensions array contains the size
of the array in that dimension. For example, in C, setting
dims[0]
to 5
and
dims[1]
to 7
establishes a
5
-by-7
mxGPUArray
.
The dims
array must not increase the overall size of
the mxGPUArray
. This array must contain at least
ndims
elements.
ndims
Number of dimensions.
Call mxGPUSetDimensions
to reshape an existing
mxGPUArray
. mxGPUSetDimensions
does not
reallocate memory.