cuda::experimental::make_if_node#

Overloads#

make_if_node(__pb, __default_val=true)#

inline conditional_node_result cuda::experimental::make_if_node(
path_builder &__pb,
bool __default_val = true
)

Adds an if-conditional node to a CUDA graph path.

At runtime, if the value of the handle is non-zero the body graph executes once; otherwise it is skipped entirely.

The caller must populate the returned body_graph with all operations that should run conditionally before the parent graph is instantiated.

Parameters:
  • __pb – Path builder to insert the node into.

  • __default_val – Initial handle value (true = execute, false = skip). Ignored when __handle is provided.

Throws:

cuda::std::cuda_error – if node creation fails.

Returns:

A conditional_node_result containing the node ref, body graph, and handle.

make_if_node(__pb, __handle)#

inline conditional_node_result cuda::experimental::make_if_node(
path_builder &__pb,
conditional_handle __handle
)

Adds an if-conditional node reusing an existing conditional handle.

Parameters:
  • __pb – Path builder to insert the node into.

  • __handle – An existing conditional handle (e.g. shared with another node).

Throws:

cuda::std::cuda_error – if node creation fails.

Returns:

A conditional_node_result containing the node ref, body graph, and handle.