cudaError_t cudaGraphicsSubResourceGetMappedArray ( struct cudaArray **  array,
cudaGraphicsResource_t  resource,
unsigned int  arrayIndex,
unsigned int  mipLevel 

Returns in *array an array through which the subresource of the mapped graphics resource resource which corresponds to array index arrayIndex and mipmap level mipLevel may be accessed. The value set in array may change every time that resource is mapped.

If resource is not a texture then it cannot be accessed via an array and cudaErrorUnknown is returned. If arrayIndex is not a valid array index for resource then cudaErrorInvalidValue is returned. If mipLevel is not a valid mipmap level for resource then cudaErrorInvalidValue is returned. If resource is not mapped then cudaErrorUnknown is returned.

array - Returned array through which a subresource of resource may be accessed
resource - Mapped resource to access
arrayIndex - Array index for array textures or cubemap face index as defined by cudaGraphicsCubeFace for cubemap textures for the subresource to access
mipLevel - Mipmap level for the subresource to access
cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorUnknown
Note that this function may also return error codes from previous, asynchronous launches.
See also:

Generated by Doxygen for NVIDIA CUDA Library  NVIDIA