Function cuGraphicsMapResources

Source
pub unsafe extern "C" fn cuGraphicsMapResources(
    count: c_uint,
    resources: *mut CUgraphicsResource,
    hStream: CUstream,
) -> CUresult
Expand description

\brief Map graphics resources for access by CUDA

Maps the \p count graphics resources in \p resources for access by CUDA.

The resources in \p resources may be accessed by CUDA until they are unmapped. The graphics API from which \p resources were registered should not access any resources while they are mapped by CUDA. If an application does so, the results are undefined.

This function provides the synchronization guarantee that any graphics calls issued before ::cuGraphicsMapResources() will complete before any subsequent CUDA work issued in \p stream begins.

If \p resources includes any duplicate entries then ::CUDA_ERROR_INVALID_HANDLE is returned. If any of \p resources are presently mapped for access by CUDA then ::CUDA_ERROR_ALREADY_MAPPED is returned.

\param count - Number of resources to map \param resources - Resources to map for CUDA usage \param hStream - Stream with which to synchronize

\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_ALREADY_MAPPED, ::CUDA_ERROR_UNKNOWN \note_null_stream \notefnerr

\sa ::cuGraphicsResourceGetMappedPointer, ::cuGraphicsSubResourceGetMappedArray, ::cuGraphicsUnmapResources, ::cudaGraphicsMapResources