ClikaRT::spec::SymInt
class
Header: ClikaRT/compute/symbolic.h
A tensor dimension: a concrete size, or a symbolic value with inclusive [lower, upper] bounds. Compose with + - * (bounds propagate) and floor_div; compare with eq/ne/lt/le/gt/ge → SymBool.
Static member functions
unknown()
static SymInt unknown(
std::int64_t lower = 0,
std::int64_t upper = kUnbounded,
std::string_view label = ""
)
A fresh symbolic dimension bounded by [lower, upper] (a data-dependent extent). label is a debug tag. upper == kUnbounded ⇒ no upper bound.
Declared in ClikaRT/compute/symbolic.h, line 82
Member functions
SymInt(int64_t)
SymInt(std::int64_t concrete)
A concrete dimension value; implicit, so a plain integer composes directly.
Declared in ClikaRT/compute/symbolic.h, line 68
SymInt(SymInt)
SymInt(const SymInt& other)
Copy: an independent value (a symbolic node, when present, is not shared).
Declared in ClikaRT/compute/symbolic.h, line 70
SymInt(SymInt)
SymInt(SymInt&& other) noexcept
Move: takes over the symbolic node; other reverts to a concrete default.
Declared in ClikaRT/compute/symbolic.h, line 72
operator=(SymInt)
Copy-assign; same value semantics as the copy ctor.
Declared in ClikaRT/compute/symbolic.h, line 74
operator=(SymInt)
Move-assign; same transfer as the move ctor.
Declared in ClikaRT/compute/symbolic.h, line 76
~SymInt()
~SymInt()
Releases the symbolic node, if any.
Declared in ClikaRT/compute/symbolic.h, line 78
operator+()
Symbolic-aware a + b; the [lower, upper] bounds propagate.
Declared in ClikaRT/compute/symbolic.h, line 86
operator-()
Symbolic-aware a - b; bounds propagate.
Declared in ClikaRT/compute/symbolic.h, line 88
operator*()
Symbolic-aware a * b; bounds propagate.
Declared in ClikaRT/compute/symbolic.h, line 90
floor_div()
Floor division. A divide-by-zero (or an unsupported symbolic form) raises ClikaRT::Error.
Declared in ClikaRT/compute/symbolic.h, line 94
eq()
Declared in ClikaRT/compute/symbolic.h, line 96
ne()
Inequality → SymBool (concrete when both sides are).
Declared in ClikaRT/compute/symbolic.h, line 98
lt()
Strict less-than → SymBool (concrete when both sides are).
Declared in ClikaRT/compute/symbolic.h, line 100
le()
Less-or-equal → SymBool (concrete when both sides are).
Declared in ClikaRT/compute/symbolic.h, line 102
gt()
Strict greater-than → SymBool (concrete when both sides are).
Declared in ClikaRT/compute/symbolic.h, line 104
ge()
Greater-or-equal → SymBool (concrete when both sides are).
Declared in ClikaRT/compute/symbolic.h, line 106
is_concrete()
bool is_concrete() const noexcept
True when this holds a plain int64 (no symbolic node).
Declared in ClikaRT/compute/symbolic.h, line 109
concrete_value()
std::optional<std::int64_t> concrete_value() const
The size iff is_concrete(), else nullopt.
Declared in ClikaRT/compute/symbolic.h, line 111
lower_bound()
std::int64_t lower_bound() const
Inclusive bounds; for a concrete value both equal it.
Declared in ClikaRT/compute/symbolic.h, line 113
upper_bound()
std::int64_t upper_bound() const
Inclusive upper bound; kUnbounded when none was declared.
Declared in ClikaRT/compute/symbolic.h, line 115
Static data members
kUnbounded
static std::int64_t kUnbounded = INT64_MAX
No upper bound (an unbounded symbol). It is declarable, but a dimension that reaches a real allocation needs a finite upper bound; eager allocation refuses an unbounded dim.
Declared in ClikaRT/compute/symbolic.h, line 65