Skip to main content

cuGraphGetRootNodes

Function cuGraphGetRootNodes 

Source
pub unsafe extern "C" fn cuGraphGetRootNodes(
    hGraph: CUgraph,
    rootNodes: *mut CUgraphNode,
    numRootNodes: *mut size_t,
) -> CUresult
Expand description

Returns a graph’s root nodes.

Returns a list of hGraph's root nodes. rootNodes may be NULL, in which case this function will return the number of root nodes in numRootNodes. Otherwise, numRootNodes entries will be filled in. If numRootNodes is higher than the actual number of root nodes, the remaining entries in rootNodes will be set to NULL, and the number of nodes actually obtained will be returned in numRootNodes.

Note: Graph objects are not threadsafe. More here.

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

§Parameters

  • hGraph: Graph to query.
  • rootNodes: Pointer to return the root nodes.
  • numRootNodes: See description.

§Return value

See also: cuGraphCreate, cuGraphGetNodes, cuGraphGetEdges, cuGraphNodeGetType, cuGraphNodeGetDependencies, cuGraphNodeGetDependentNodes.