Create mxArray for returning CPU data to MATLAB with data from GPU
#include "gpu/mxGPUArray.h" mxArray* mxGPUCreateMxArrayOnCPU(mxGPUArray const * const mgp)
mgp
Pointer to an mxGPUArray
.
Pointer to an mxArray
object containing CPU data that is a copy of the GPU data.
mxGPUCreateMxArrayOnCPU
copies the GPU data from the
specified mxGPUArray
into an mxArray
on the
CPU for return to MATLAB. This is similar to the gather
function. After calling
this function, the input mxGPUArray object is no longer needed and you can delete it
with mxGPUDestroyGPUArray
.