Function cuGraphAddNode

Source
pub unsafe extern "C" fn cuGraphAddNode(
    phGraphNode: *mut CUgraphNode,
    hGraph: CUgraph,
    dependencies: *const CUgraphNode,
    numDependencies: usize,
    nodeParams: *mut CUgraphNodeParams,
) -> CUresult
Expand description

\brief Adds a node of arbitrary type to a graph

Creates a new node in \p hGraph described by \p nodeParams with \p numDependencies dependencies specified via \p dependencies. \p numDependencies may be 0. \p dependencies may be null if \p numDependencies is 0. \p dependencies may not have any duplicate entries.

\p nodeParams is a tagged union. The node type should be specified in the \p type field, and type-specific parameters in the corresponding union member. All unused bytes - that is, \p 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, \p nodeParams may contain “out parameters” which are modified during the call, such as \p nodeParams->alloc.dptr.

A handle to the new node will be returned in \p phGraphNode.

\param phGraphNode - Returns newly created node \param hGraph - Graph to which to add the node \param dependencies - Dependencies of the node \param numDependencies - Number of dependencies \param nodeParams - Specification of the node

\return ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_NOT_SUPPORTED \note_graph_thread_safety \notefnerr

\sa ::cuGraphCreate, ::cuGraphNodeSetParams, ::cuGraphExecNodeSetParams