mxGPUSetDimensions (C)
Modify number of dimensions and size of each dimension
C Syntax
#include "gpu/mxGPUArray.h" void mxGPUSetDimensions(mxGPUArray * const mgp, mwSize const * const dims, mwSize const ndims);
Arguments
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]
to5
anddims[1]
to7
establishes a5
-by-7
mxGPUArray
.The
dims
array must not increase the overall size of themxGPUArray
. This array must contain at leastndims
elements.ndims
Number of dimensions.
Description
Call mxGPUSetDimensions
to reshape an existing
mxGPUArray
. mxGPUSetDimensions
does not
reallocate memory.
Version History
Introduced in R2018b