Function rcudnn::cudaGraphicsMapResources[][src]

pub unsafe extern "C" fn cudaGraphicsMapResources(
    count: i32,
    resources: *mut *mut cudaGraphicsResource,
    stream: *mut CUstream_st
) -> cudaError
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 ::cudaGraphicsMapResources() will complete before any subsequent CUDA work issued in \p stream begins.

If \p resources contains any duplicate entries then ::cudaErrorInvalidResourceHandle is returned. If any of \p resources are presently mapped for access by CUDA then ::cudaErrorUnknown is returned.

\param count - Number of resources to map \param resources - Resources to map for CUDA \param stream - Stream for synchronization

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

\sa ::cudaGraphicsResourceGetMappedPointer, ::cudaGraphicsSubResourceGetMappedArray, ::cudaGraphicsUnmapResources, ::cuGraphicsMapResources