What can I help you with?
NVIDIA Holoscan SDK v3.2.0

Class MemoryAvailableCondition

Base Type

class MemoryAvailableCondition : public holoscan::gxf::GXFCondition

Condition that permits execution only when a specified allocator has sufficient memory available.

The memory is typically provided via the min_bytes parameter, but for allocators that use memory blocks it is possible to specify the memory via min_blocks instead if desired.

==Parameters==

  • allocator (holoscan::Allocator): The allocator whose memory availability should be checked.

  • min_bytes (uint64_t, optional): The minimum number of bytes that must be available in order for the associated operator to execute. Exclusive with min_blocks (only one can be set).

  • min_blocks (uint64_t, optional): The minimum number of blocks that must be available in order for the associated operator to execute. Can only be used with allocators such as BlockMemoryPool that use memory blocks. Exclusive with min_bytes (only one can be set).

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 MemoryAvailableCondition(ArgT &&arg, ArgsT&&... args)
MemoryAvailableCondition() = default
inline virtual const char *gxf_typename() const override
inline void allocator(std::shared_ptr<Allocator> allocator)
inline std::shared_ptr<Allocator> allocator()
virtual void setup(ComponentSpec &spec) override

Define the condition specification.

Parameters

spec – The reference to the component specification.

virtual void initialize() override

Initialize the component.

This method is called only once when the component is created for the first time, and use of light-weight initialization.

nvidia::gxf::MemoryAvailableSchedulingTerm *get() const

Previous Template Class Map
Next Class Message
© Copyright 2022-2025, NVIDIA. Last updated on May 29, 2025.