Create mxArray for returning GPU data to MATLAB
#include "gpu/mxGPUArray.h" mxArray* mxGPUCreateMxArrayOnGPU(mxGPUArray const * const mgp)
mgpPointer to an mxGPUArray.
Pointer to an mxArray object
containing GPU data.
mxGPUCreateMxArrayOnGPU puts the mxGPUArray into
an mxArray for return to MATLAB. The data remains
on the GPU and the returned class in MATLAB is gpuArray.
After this call, the mxGPUArray object is no longer needed and can
be destroyed.