Class CudaEventCondition
Defined in File cuda_event.hpp
Base Type
public holoscan::gxf::GXFCondition
(Class GXFCondition)
-
class CudaEventCondition : public holoscan::gxf::GXFCondition
Condition class to indicate data availability on CUDA stream completion via an event.
TODO(Greg): This condition requires there be a CudaEvent component in the message Entity.
e.g. it calls auto maybe_event = message->get<CudaEvent>(event_name_.get().c_str());
See StreamBasedOps codelet in gxf/cuda/tests/test_cuda_helper.hpp specifically the methods
addNewEvent
andinitOpsEvent
and how they are used in the operators that inherit from StreamBasedOpsWe have not yet exposed CudaEvent object from Holoscan. Need to provide a convenient way to use it.
A condition which specifies the availability of data at the receiver on completion of the work on the provided cuda stream with the help of cuda event. This condition will keep polling on the event provided to check for data availability for consumption.
Public Functions
-
template<typename ArgT, typename ...ArgsT, typename = std::enable_if_t<!std::is_base_of_v<::holoscan::Condition, std::decay_t<ArgT>> && (std::is_same_v<::holoscan::Arg, std::decay_t<ArgT>> || std::is_same_v<::holoscan::ArgList, std::decay_t<ArgT>>)>>
inline explicit CudaEventCondition(ArgT &&arg, ArgsT&&... args)
-
CudaEventCondition() = default
-
CudaEventCondition(const std::string &name, nvidia::gxf::CudaEventSchedulingTerm *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.
-
inline std::shared_ptr<gxf::GXFResource> receiver()
-
nvidia::gxf::CudaEventSchedulingTerm *get() const
-
template<typename ArgT, typename ...ArgsT, typename = std::enable_if_t<!std::is_base_of_v<::holoscan::Condition, std::decay_t<ArgT>> && (std::is_same_v<::holoscan::Arg, std::decay_t<ArgT>> || std::is_same_v<::holoscan::ArgList, std::decay_t<ArgT>>)>>