mxGPUCreateGPUArray (C)
Create mxGPUArray object, allocating memory on GPU
C Syntax
#include "gpu/mxGPUArray.h"
mxGPUArray* mxGPUCreateGPUArray(mwSize const ndims,
mwSize const * const dims,
mxClassID const cid,
mxComplexity const ccx,
mxGPUInitialize const init0)Arguments
ndimsmwSizetype specifying the number of dimensions in the createdmxGPUArray.dimsPointer to an
mwSizevector specifying the sizes of each dimension in the createdmxGPUArray.cidmxClassIDtype specifying the element class of the createdmxGPUArray.ccxmxComplexitytype specifying the complexity of the createdmxGPUArray.init0mxGPUInitializetype specifying whether to initialize elements values to 0 in the createdmxGPUArray.A value of
MX_GPU_INITIALIZE_VALUESspecifies that elements are to be initialized to 0.A value of
MX_GPU_DO_NOT_INITIALIZEspecifies that elements are not to be initialized.
Returns
Pointer to an mxGPUArray.
Description
mxGPUCreateGPUArray creates a new mxGPUArray object with the specified size, type, and complexity. It also allocates the required memory on the GPU, and initializes the memory if requested.
This function allocates a new mxGPUArray object on the CPU. Use mxGPUDestroyGPUArray to delete the object when you are done with it.
Version History
Introduced in R2013a