Skip to main content

cuGraphAddChildGraphNode

Function cuGraphAddChildGraphNode 

Source
pub unsafe extern "C" fn cuGraphAddChildGraphNode(
    phGraphNode: *mut CUgraphNode,
    hGraph: CUgraph,
    dependencies: *const CUgraphNode,
    numDependencies: size_t,
    childGraph: CUgraph,
) -> CUresult
Expand description

Creates a child graph node and adds it to a graph.

Creates a new node which executes an embedded graph, and adds it to hGraph with numDependencies dependencies specified via dependencies. It is possible for numDependencies to be 0, in which case the node will be placed at the root of the graph. dependencies may not have any duplicate entries. A handle to the new node will be returned in phGraphNode.

If childGraph contains allocation nodes, free nodes, or conditional nodes, this call will return an error.

The node executes an embedded child graph. The child graph is cloned in this call.

Note: Graph objects are not threadsafe. More here.

Note that this function may also return error codes from previous, asynchronous launches.

§Parameters

  • phGraphNode: Returns newly created node.
  • hGraph: Graph to which to add the node.
  • dependencies: Dependencies of the node.
  • numDependencies: Number of dependencies.
  • childGraph: The graph to clone into this node.

§Return value

See also: cuGraphAddNode, cuGraphChildGraphNodeGetGraph, cuGraphCreate, cuGraphDestroyNode, cuGraphAddEmptyNode, cuGraphAddKernelNode, cuGraphAddHostNode, cuGraphAddMemcpyNode, cuGraphAddMemsetNode, cuGraphClone.