Function rcudnn_sys::cudaGraphicsSubResourceGetMappedArray[][src]

pub unsafe extern "C" fn cudaGraphicsSubResourceGetMappedArray(
    array: *mut cudaArray_t,
    resource: cudaGraphicsResource_t,
    arrayIndex: c_uint,
    mipLevel: c_uint
) -> cudaError_t
Expand description

\brief Get an array through which to access a subresource of a mapped graphics resource.

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

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

\param array - Returned array through which a subresource of \p resource may be accessed \param resource - Mapped resource to access \param arrayIndex - Array index for array textures or cubemap face index as defined by ::cudaGraphicsCubeFace for cubemap textures for the subresource to access \param mipLevel - Mipmap level for the subresource to access

\return ::cudaSuccess, ::cudaErrorInvalidValue, ::cudaErrorInvalidResourceHandle, ::cudaErrorUnknown \notefnerr \note_init_rt \note_callback

\sa ::cudaGraphicsResourceGetMappedPointer, ::cuGraphicsSubResourceGetMappedArray