Skip to navigation

holoscan::RateGenerationSnapshot

Beta
View as Markdown

Own bounded published and rejected rate-generation evidence for one RunSession.

The snapshot contains the active published generation and, when present, the most recent rejected candidate. It owns every record and remains valid after the originating session ends. An initial candidate failure can produce a rejected-only snapshot, so published() may return null; use last_rejected() to inspect that startup failure. Generation-specific range overloads accept only the exact record returned by this snapshot; copied, caller-created, and foreign-snapshot records return an empty span. The snapshot is immutable after construction: it may be copy- or move-constructed but cannot be assigned. Copy construction creates independent record storage. Runtime callback contexts cannot capture a snapshot; ordinary compute queries continue to use the allocation-free PortRateView path.

#include <holoscan/rate_generation.hpp>

Every returned pointer and span is borrowed from this object. It remains valid only while this snapshot remains alive and is not moved from. Do not use a record with another snapshot, including a copied snapshot.


Constructors

RateGenerationSnapshot

Construct an empty immutable snapshot.


Assignment operators

operator=

The following overloads are deleted to prevent misuse:


Methods

plan_digest

PlanDigest holoscan::RateGenerationSnapshot::plan_digest() const noexcept

plan_generation

PlanGenerationId holoscan::RateGenerationSnapshot::plan_generation() const noexcept

run_generation

RunGenerationId holoscan::RateGenerationSnapshot::run_generation() const noexcept

published

const RateGenerationEvidenceRecord * holoscan::RateGenerationSnapshot::published() const noexcept

last_rejected

const RateGenerationEvidenceRecord * holoscan::RateGenerationSnapshot::last_rejected() const noexcept

generations

std::span<const RateGenerationEvidenceRecord> holoscan::RateGenerationSnapshot::generations() const noexcept

port_rates

std::span<const PortRateGenerationRecord> holoscan::RateGenerationSnapshot::port_rates() const noexcept

queue_sizings

std::span<const QueueSizingGenerationRecord> holoscan::RateGenerationSnapshot::queue_sizings() const noexcept

pool_contributions

std::span<const PoolCapacityContributionGenerationRecord> holoscan::RateGenerationSnapshot::pool_contributions() const noexcept

pool_capacities

std::span<const PoolCapacityGenerationRecord> holoscan::RateGenerationSnapshot::pool_capacities() const noexcept

provider_allocations

std::span<const ProviderAllocationGenerationRecord> holoscan::RateGenerationSnapshot::provider_allocations() const noexcept

owns_generation

bool holoscan::RateGenerationSnapshot::owns_generation(
const RateGenerationEvidenceRecord &generation
) const noexcept

record_range

template <typename Record, typename Id>
std::span<const Record> holoscan::RateGenerationSnapshot::record_range(
const std::vector<Record> &records,
const RateGenerationEvidenceRecord &generation,
Id first,
std::uint32_t count
) const noexcept

record_belongs_to_generation

template <typename Record>
static bool holoscan::RateGenerationSnapshot::record_belongs_to_generation(
const Record &record,
const RateGenerationEvidenceRecord &generation
) noexcept

Member variables

NameTypeDescription
plan_digest_PlanDigest
plan_generation_PlanGenerationId
run_generation_RunGenerationId
generations_std::vector< RateGenerationEvidenceRecord >
port_rates_std::vector< PortRateGenerationRecord >
queue_sizings_std::vector< QueueSizingGenerationRecord >
pool_contributions_std::vector< PoolCapacityContributionGenerationRecord >
pool_capacities_std::vector< PoolCapacityGenerationRecord >
provider_allocations_std::vector< ProviderAllocationGenerationRecord >