NVIDIA Holoscan SDK v1.0.3
Holoscan 1.0.3

Class AsynchronousCondition

Base Type

class AsynchronousCondition : public holoscan::gxf::GXFCondition

Condition class to support asynchronous execution of operators.

The method event_state() method is used to get or set the asynchronous condition’s state. The possible states are:

  • AsynchronousEventState::READY ///< Initial state, first compute call is pending

  • AsynchronousEventState::WAIT ///< Request to async service yet to be sent, nothing to do but wait

  • AsynchronousEventState::EVENT_WAITING ///< Request sent to an async service, pending event done notification

  • AsynchronousEventState::EVENT_DONE ///< Event done notification received, entity ready to compute

  • AsynchronousEventState::EVENT_NEVER ///< Entity will not call compute again, end of execution

TODO: expand documentation

This class wraps GXF SchedulingTerm(nvidia::gxf::AsynchronousSchedulingTerm).

Public Functions

template<typename ArgT, typename ...ArgsT, typename = std::enable_if_t<!std::is_base_of_v<Condition, std::decay_t<ArgT>> && (std::is_same_v<Arg, std::decay_t<ArgT>> || std::is_same_v<ArgList, std::decay_t<ArgT>>)>>
inline AsynchronousCondition(ArgT &&arg, ArgsT&&... args)

AsynchronousCondition() = default

AsynchronousCondition(const std::string &name, nvidia::gxf::AsynchronousSchedulingTerm *term)

inline virtual const char *gxf_typename() const override

virtual void setup(ComponentSpec &spec) override

Define the condition specification.

Parameters

spec – The reference to the component specification.

void event_state(AsynchronousEventState state)

Set the condition’s asynchronous event state.

Parameters

state – The state to which the condition should be set.

AsynchronousEventState event_state() const

Get the asynchronous event state.

Returns

The current state of the condition.

Previous Class ArgumentSetter
Next Class BlockMemoryPool
© Copyright 2022-2023, NVIDIA. Last updated on Apr 19, 2024.