Function cudaGraphAddNode

Source
pub unsafe extern "C" fn cudaGraphAddNode(
    pGraphNode: *mut cudaGraphNode_t,
    graph: cudaGraph_t,
    pDependencies: *const cudaGraphNode_t,
    numDependencies: usize,
    nodeParams: *mut cudaGraphNodeParams,
) -> cudaError_t
Expand description

\brief Adds a node of arbitrary type to a graph

Creates a new node in \p graph described by \p nodeParams with \p numDependencies dependencies specified via \p pDependencies. \p numDependencies may be 0. \p pDependencies may be null if \p numDependencies is 0. \p pDependencies 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 pGraphNode - Returns newly created node \param graph - Graph to which to add the node \param pDependencies - Dependencies of the node \param numDependencies - Number of dependencies \param nodeParams - Specification of the node

\return ::cudaSuccess, ::cudaErrorInvalidValue, ::cudaErrorInvalidDeviceFunction, ::cudaErrorNotSupported \note_graph_thread_safety \notefnerr \note_init_rt \note_callback

\sa ::cudaGraphCreate, ::cudaGraphNodeSetParams, ::cudaGraphExecNodeSetParams