Skip to main content

cudaGraphGetNodes

Function cudaGraphGetNodes 

Source
pub unsafe extern "C" fn cudaGraphGetNodes(
    graph: cudaGraph_t,
    nodes: *mut cudaGraphNode_t,
    numNodes: *mut size_t,
) -> cudaError_t
Expand description

Returns a graph’s nodes.

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

Note: Graph objects are not threadsafe. More here.

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

  • graph: Graph to query.
  • nodes: Pointer to return the nodes.
  • numNodes: See description.

§Return value

See also: cudaGraphCreate, cudaGraphGetRootNodes, cudaGraphGetEdges, cudaGraphNodeGetType, cudaGraphNodeGetDependencies, cudaGraphNodeGetDependentNodes.