pub unsafe extern "C" fn cuGraphAddNode_v2(
phGraphNode: *mut CUgraphNode,
hGraph: CUgraph,
dependencies: *const CUgraphNode,
dependencyData: *const CUgraphEdgeData,
numDependencies: size_t,
nodeParams: *mut CUgraphNodeParams,
) -> CUresultExpand description
Adds a node of arbitrary type to a graph
Creates a new node in hGraph described by nodeParams with numDependencies dependencies specified via dependencies. numDependencies may be 0. dependencies may be null if numDependencies is 0. dependencies may not have any duplicate entries.
nodeParams is a tagged union. The node type should be specified in the type field, and type-specific parameters in the corresponding union member. All unused bytes - that is, reserved0 and all bytes past the utilized union member - must be set to zero. It is recommended to use brace initialization or memset to ensure all bytes are initialized.
Note that for some node types, nodeParams may contain “out parameters” which are modified during the call, such as nodeParams->alloc.dptr.
A handle to the new node will be returned in phGraphNode.
§Return value
::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_NOT_SUPPORTED
Note: _graph_thread_safety
See also: ::cuGraphCreate, ::cuGraphNodeSetParams, ::cuGraphExecNodeSetParams
§Parameters
phGraphNode: - Returns newly created nodehGraph: - Graph to which to add the nodedependencies: - Dependencies of the nodedependencyData: - Optional edge data for the dependencies. If NULL, the data is assumed to be default (zeroed) for all dependencies.numDependencies: - Number of dependenciesnodeParams: - Specification of the node