Holoscan SDK v3.11.0

Class Entity

Base Type

  • public nvidia::gxf::Entity

class Entity : public nvidia::gxf::Entity

Class to wrap GXF Entity (nvidia::gxf::Entity).

Public Functions

Entity() = default
inline explicit Entity(const nvidia::gxf::Entity &other)
inline explicit Entity(nvidia::gxf::Entity &&other)
inline operator bool() const

Return true if the entity is not null.

Calling this method on an entity object from {cpp:func}holoscan::IOContext::receive will return false if there is no entity to receive.

Returns

true if the entity is not null. Otherwise, false.

template<typename DataT, typename = std::enable_if_t<!holoscan::is_vector_v<DataT> && holoscan::is_one_of_v<DataT, holoscan::Tensor>>>
inline std::shared_ptr<DataT> get(const char *name = nullptr, bool log_errors = true) const
template<typename DataT, typename = std::enable_if_t<!holoscan::is_vector_v<DataT> && holoscan::is_one_of_v<DataT, holoscan::Tensor>>>
inline void add(const std::shared_ptr<DataT> &data, const char *name = nullptr, std::optional<cudaStream_t> stream = std::nullopt)

Adds a tensor component to the entity.

Template Parameters

DataT – The data type (must be holoscan::Tensor).

Parameters
  • data – Shared pointer to the tensor data.

  • name – Optional name for the component.

  • stream – Optional CUDA stream for stream-aware memory deallocation. When provided, the stream is set on the tensor’s memory buffer, enabling allocators like BlockMemoryPool to defer memory reuse until GPU operations complete.

Public Static Functions

static Entity New(ExecutionContext *context)

Previous Class Endpoint
Next Class EntityGroup
© Copyright 2022-2026, NVIDIA. Last updated on Mar 9, 2026