pub unsafe extern "C" fn cudaGraphicsMapResources(
count: c_int,
resources: *mut cudaGraphicsResource_t,
stream: cudaStream_t,
) -> cudaError_tExpand description
Map graphics resources for access by CUDA.
Maps the count graphics resources in resources for access by CUDA.
The resources in resources may be accessed by CUDA until they are unmapped. The graphics API from which 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 stream begins.
If resources contains any duplicate entries then cudaError_t::CUDA_ERROR_INVALID_HANDLE is returned. If any of resources are presently mapped for access by CUDA then cudaError_t::CUDA_ERROR_UNKNOWN is returned.
Note: This function uses standard default stream semantics.
Note that this function may also return error codes from previous, asynchronous launches.
Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.
Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.
§Parameters
count: Number of resources to map.resources: Resources to map for CUDA.stream: Stream for synchronization.
§Return value
See also: cudaGraphicsResourceGetMappedPointer, cudaGraphicsSubResourceGetMappedArray, cudaGraphicsUnmapResources, cuGraphicsMapResources.