Skip to navigation

holoscan::TensorOutputSpecBuilder

Beta
View as Markdown

Configure a Tensor or descriptor-backed Tensor schema output.

Every common output method preserves this specialized fluent type. Runtime-pool intent and its finite bounds are declared together in TensorOutputSpec; compilation admits and materializes physical placement in a later component.

#include <holoscan/operator_spec.hpp>

Methods

nominal_rate

HOLOSCAN_CORE_EXPORT TensorOutputSpecBuilder & holoscan::TensorOutputSpecBuilder::nominal_rate(
Rate rate
)

Declare one fixed nominal output rate.

lifecycle_nominal_rate

HOLOSCAN_CORE_EXPORT TensorOutputSpecBuilder & holoscan::TensorOutputSpecBuilder::lifecycle_nominal_rate(
LifecycleStage bind_stage
)

Declare the forward lifecycle stage that selects this output’s nominal rate.

max_nominal_rate

HOLOSCAN_CORE_EXPORT TensorOutputSpecBuilder & holoscan::TensorOutputSpecBuilder::max_nominal_rate(
Rate rate
)

Declare the maximum selectable nominal average for a lifecycle-selected output.

follows

template <PublishedPayload U>
const Input<U> &input,
RateRatio ratio = {}
)

Derive this output’s nominal rate from one input owned by the same Operator.

max_emits_per_compute

TensorOutputSpecBuilder & holoscan::TensorOutputSpecBuilder::max_emits_per_compute(
std::uint32_t count = 1
) noexcept

Set the maximum publications admitted from one compute activation.

Returns: This specialized builder.

Parameters

count
std::uint32_tDefaults to 1

Positive finite burst bound; the declaration default is one.

late_joiner_history_depth

TensorOutputSpecBuilder & holoscan::TensorOutputSpecBuilder::late_joiner_history_depth(
std::uint32_t depth
) noexcept

Set optional retained history for late subscribers.

Returns: This specialized builder.

Parameters

depth
std::uint32_t

Finite retained sample count; zero disables retained history.

diagnostic_alias

TensorOutputSpecBuilder & holoscan::TensorOutputSpecBuilder::diagnostic_alias(
std::string_view alias
)

Record an alternate diagnostic display name.

Returns: This specialized builder.

Throws: std::bad_alloc if storage for the copied alias cannot be allocated.

Throws: std::length_error if alias exceeds the implementation’s maximum string size.

Parameters

alias
std::string_view

Display-only name copied into cold metadata.

produces_tensor

TensorOutputSpecBuilder & holoscan::TensorOutputSpecBuilder::produces_tensor(
const TensorOutputSpec &spec
)

Record one normalized producer Tensor spec.

Returns: This specialized builder.

Parameters

spec
const TensorOutputSpec &

Representation, finite bounds, storage intent, and transfer policy.

payload_options

TensorOutputSpecBuilder & holoscan::TensorOutputSpecBuilder::payload_options(
)

Record schema identity and payload options carried by this output.

Returns: This specialized builder.

Parameters

options
PayloadOptions

Complete payload options copied into this builder.

tensor_field

inlinenodiscard
template <typename SchemaT>
TensorFieldSelector<SchemaT> selector
)

Select one Tensor member for field-scoped output declarations.

The returned non-owning builder must not outlive this parent builder.

Returns: Field-scoped builder for logical, materialization, and allocation facts.

Template parameters

SchemaT
typename

Owning generated descriptor-backed schema type.

Parameters

selector
TensorFieldSelector<SchemaT>

Generated schema-typed field token.

tensor_fields

template <typename SchemaT, std::size_t N>
const std::array<TensorFieldSelector<SchemaT>, N> &selectors,
const TensorOutputSpec &spec
)

Apply one output spec to a statically listed set of Tensor fields.

Returns: This output builder.

Throws: std::bad_alloc if field-record storage cannot be allocated.

Template parameters

SchemaT
typename

Owning generated descriptor-backed schema type.

N
std::size_t

Number of listed selectors.

Parameters

selectors
const std::array<TensorFieldSelector<SchemaT>, N> &

Generated schema-typed field tokens.

spec
const TensorOutputSpec &

Shared logical, allocation, and optional materialization facts.

follows_input

HOLOSCAN_CORE_EXPORT TensorOutputSpecBuilder & holoscan::TensorOutputSpecBuilder::follows_input(
const InputBase &input,
RateRatio ratio
)

record_contract_error

void holoscan::TensorOutputSpecBuilder::record_contract_error(
std::string_view token
)

Member variables

NameTypeDescription
max_emits_per_compute_std::uint32_t
late_joiner_history_depth_std::uint32_t
diagnostic_alias_std::string
tensor_layout_std::optional< TensorRepresentation >
payload_options_std::optional< PayloadOptionsRecord >
tensor_allocation_TensorPoolBounds
has_tensor_allocation_bool
tensor_contract_std::optional< TensorContractRecord >
tensor_byte_span_expression_std::optional< TensorByteSpanExpression >
tensor_memory_kind_expression_std::optional< TensorMemoryKindExpression >
tensor_contract_error_Error
descriptor_tensor_field_count_std::uint16_t
descriptor_tensor_schema_bool
tensor_fields_std::vector< detail::AuthoredTensorFieldConfiguration >
rate_detail::AuthoredPortRate