cuda::experimental::make_while_node#

Overloads#

make_while_node(__pb, __default_val=true)#

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

Adds a while-conditional node to a CUDA graph path.

At runtime, the body graph is executed repeatedly as long as the handle value is non-zero at the start of each iteration (including the first).

The caller must populate the returned body_graph before instantiating the parent graph. The body is responsible for calling handle.set_value(false) or handle.disable() to terminate the loop.

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

  • __default_val – Initial handle value (true = enter loop, false = skip).

Throws:

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

Returns:

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

make_while_node(__pb, __handle)#

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

Adds a while-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.