NVIDIA Holoscan SDK v3.0.0

Class EntityGroup

class EntityGroup

GXF entity group.

Define an entity group for the underlying GXF runtime. Entity groups are used to associate components with resources inheriting from nvidia::gxf::ResourceBase. The components of this type exposed in Holoscan SDK’s API are GPUDevice and ThreadPool.

Public Functions

EntityGroup() = delete
EntityGroup(gxf_context_t context, const std::string &name)
inline gxf_uid_t gxf_gid() const

Get the group id of the entity group.

Returns

The GXF group id of the entity group.

inline gxf_context_t gxf_context() const

Get the GXF context of the entity group.

Returns

The GXF context of the entity group.

inline std::string name() const

Get the name of the entity group.

Returns

The name of the entity group.

void add(gxf_uid_t eid)

Add a GXF entity to the entity group.

If the entity is already a member of a different entity group, it will be removed from that group and added to this one.

Will raise a runtime_error if the entity is already a member of this entity group.

Parameters

eid – The GXF unique id corresponding to the entity.

void add(const GXFComponent &component)

Add a GXFComponent to the entity group.

If the component is already a member of a different entity group, it will be removed from that group and the entity it belongs to will be added to this one.

Will raise a runtime_error if the entity is already a member of this entity group.

Parameters

component – The component to add to the entity group.

void add(std::shared_ptr<Operator> op, const std::string &entity_prefix = "")

Add an Operator to the entity group.

If the operator is already a member of a different entity group, it will be removed from that group and added to this one.

Will raise a runtime_error if the entity is already a member of this entity group.

Parameters
  • op – The operator to add to the entity group.

  • entity_prefix – A string prefix that can be used to indicate the entity the operator belongs to.

Previous Class Entity
Next Class FragmentWrapper
© Copyright 2022-2025, NVIDIA. Last updated on Mar 12, 2025.