Skip to main content

cudaGraphicsUnmapResources

Function cudaGraphicsUnmapResources 

Source
pub unsafe extern "C" fn cudaGraphicsUnmapResources(
    count: c_int,
    resources: *mut cudaGraphicsResource_t,
    stream: cudaStream_t,
) -> cudaError_t
Expand description

Unmap graphics resources.

Unmaps the count graphics resources in resources.

Once unmapped, the resources in resources may not be accessed by CUDA until they are mapped again.

This function provides the synchronization guarantee that any CUDA work issued in stream before cudaGraphicsUnmapResources will complete before any subsequently issued graphics work begins.

If resources contains any duplicate entries then cudaError_t::CUDA_ERROR_INVALID_HANDLE is returned. If any of resources are not 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 unmap.
  • resources: Resources to unmap.
  • stream: Stream for synchronization.

§Return value

See also: cudaGraphicsMapResources, cuGraphicsUnmapResources.