mxGPUCopyFromMxArray (C)
Copy mxArray to mxGPUArray
C Syntax
#include "gpu/mxGPUArray.h" mxGPUArray* mxGPUCopyFromMxArray(mxArray const * const mp)
Arguments
mpPointer to an
mxArraythat contains either GPU or CPU data.
Returns
Pointer to an mxGPUArray.
Description
mxGPUCopyFromMxArray produces a new mxGPUArray object with the same characteristics as the input mxArray.
If the input
mxArraycontains agpuArray, the output is a new copy of the data on the GPU.If the input
mxArraycontains numeric or logical CPU data, the output is copied to the GPU.
Either way, this function always allocates memory on the GPU and allocates a new mxGPUArray object on the CPU. Use mxGPUDestroyGPUArray to delete the result when you are done with it.
Version History
Introduced in R2013a