Skip to main content

cudaGraphRetainUserObject

Function cudaGraphRetainUserObject 

Source
pub unsafe extern "C" fn cudaGraphRetainUserObject(
    graph: cudaGraph_t,
    object: cudaUserObject_t,
    count: c_uint,
    flags: c_uint,
) -> cudaError_t
Expand description

Retain a reference to a user object from a graph.

Creates or moves user object references that will be owned by a CUDA graph.

See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.

§Parameters

  • graph: The graph to associate the reference with.
  • object: The user object to retain a reference for.
  • count: The number of references to add to the graph, typically 1. Must be nonzero and not larger than INT_MAX.
  • flags: The optional flag cudaGraphUserObjectMove transfers references from the calling thread, rather than create new references. Pass 0 to create new references.

§Return value

See also: cudaUserObjectCreate, cudaUserObjectRetain, cudaUserObjectRelease, cudaGraphReleaseUserObject, cudaGraphCreate.