This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

mxGPUIsValidGPUData (C)

Determine if mxArray is pointer to valid GPU data

C Syntax

#include "gpu/mxGPUArray.h"
int mxGPUIsValidGPUData(mxArray const * const mp)



Pointer to an mxArray.


int type.


mxGPUIsValidGPUData indicates if the mxArray is a pointer to valid GPU data

If the GPU device is reinitialized in MATLAB with gpuDevice, all data on the device becomes invalid, but the CPU data structures that refer to the GPU data still exist. This function checks whether the mxArray is a container of valid GPU data, and returns one of the following values:

  • 0 (false) for CPU data or for invalid GPU data.

  • 1 (true) for valid GPU data.

See Also

Introduced in R2013a