pub unsafe extern "C" fn cuGraphicsSubResourceGetMappedArray(
pArray: *mut CUarray,
resource: CUgraphicsResource,
arrayIndex: c_uint,
mipLevel: c_uint,
) -> CUresultExpand description
Get an array through which to access a subresource of a mapped graphics resource.
Returns in *pArray 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 *pArray may change every time that resource is mapped.
If resource is not a texture then it cannot be accessed via an array and cudaError_enum::CUDA_ERROR_NOT_MAPPED_AS_ARRAY is returned. If arrayIndex is not a valid array index for resource then cudaError_enum::CUDA_ERROR_INVALID_VALUE is returned. If mipLevel is not a valid mipmap level for resource then cudaError_enum::CUDA_ERROR_INVALID_VALUE is returned. If resource is not mapped then cudaError_enum::CUDA_ERROR_NOT_MAPPED is returned.
Note that this function may also return error codes from previous, asynchronous launches.
§Parameters
pArray: Returned array through which a subresource ofresourcemay be accessed.resource: Mapped resource to access.arrayIndex: Array index for array textures or cubemap face index as defined byCUarray_cubemap_facefor cubemap textures for the subresource to access.mipLevel: Mipmap level for the subresource to access.
§Return value
CUresult::CUDA_SUCCESSCUresult::CUDA_ERROR_DEINITIALIZEDCUresult::CUDA_ERROR_NOT_INITIALIZEDCUresult::CUDA_ERROR_INVALID_CONTEXTCUresult::CUDA_ERROR_INVALID_VALUECUresult::CUDA_ERROR_INVALID_HANDLECUresult::CUDA_ERROR_NOT_MAPPEDCUresult::CUDA_ERROR_NOT_MAPPED_AS_ARRAY
See also: cuGraphicsResourceGetMappedPointer, cudaGraphicsSubResourceGetMappedArray.