Class anira::SpecView#

class SpecView#

A read-only view of a tensor spec over the anira_tensor_spec getters: what ModelConfig::input_spec / output_spec hand out (the config’s own copy, valid until the config is mutated, moved or destroyed) and what TensorSpec::view() answers over a spec being built. Every read is noexcept; an axis at or beyond ndim() reads {ANIRA_AXIS_ANY, 0}, an extent no set axis has (the rule of Tensor::extent). Trivially copyable.

Public Functions

inline explicit SpecView(const anira_tensor_spec *spec) noexcept#
inline std::string_view name() const noexcept#

The canonical name, owned by the spec.

inline DType dtype() const noexcept#
inline Role role() const noexcept#
inline uint32_t ndim() const noexcept#

One more than the highest axis set; a hole below it reads {ANIRA_AXIS_ANY, 0}.

inline Axis axis(uint32_t i) const noexcept#
inline Window window() const noexcept#

0, 0, 0 until TensorSpec::window ran; never the window a validation derives for a streamed spec without one (PlanReport::slots carries the window in use).

inline TimeRatio time_ratio() const noexcept#
inline int64_t latency() const noexcept#

The model’s internal latency along the Time axis.

inline std::string_view state_source() const noexcept#

A State input’s source, the canonical name of its State output; empty without one.

inline const anira_tensor_spec *native() const noexcept#
struct Axis#

Public Members

AxisTag tag = ANIRA_AXIS_ANY#
int64_t extent = 0#

ANIRA_DYNAMIC where it was set so.

struct TimeRatio#

Public Members

int64_t num = 0#

(0, 0) = derive

int64_t den = 0#
struct Window#

Public Members

int64_t min = 0#
int64_t max = 0#

ANIRA_UNBOUNDED where it was set so.

int64_t overlap = 0#