ClikaRT::ops::IndexBound
class
Header: ClikaRT/compute/tensor.h
An integer-typed op bound, a reshape dim: either a concrete int64_t literal or a 0-D/1-D integer Tensor (e.g. a shape_host read), so a shape-consuming argument composes without pulling concrete sizes to the host. Narrower than ScalarOrTensor by design: no float ctor (reshape(x, {1.5}) fails at compile time) and bool is deleted (it would otherwise promote silently to an index).
Member functions
IndexBound()
IndexBound() =default
Absent: a slice slot left open ("from the beginning" / "to the end"). A reshape dim must not be absent (the op refuses it).
Declared in ClikaRT/compute/tensor.h, line 788
IndexBound(nullopt_t)
IndexBound(std::nullopt_t)
Absent, spelled std::nullopt (the same open-bound meaning as the default ctor).
Declared in ClikaRT/compute/tensor.h, line 790
IndexBound(T)
template <``typename T, typename std::enable_if<std::is_integral<T>::value &&!std::is_same<T, bool>::value, int>::type = 0``>IndexBound(T v)
A concrete integer bound; any integral width, kept exact.
Declared in ClikaRT/compute/tensor.h, line 796
IndexBound(Tensor)
IndexBound(Tensor tensor)
A tensor bound (0-D/1-D integer Tensor); consumed on-device, no host sync.
Declared in ClikaRT/compute/tensor.h, line 798
IndexBound(bool)
IndexBound(bool) =delete
Declared in ClikaRT/compute/tensor.h, line 799
has_value()
bool has_value() const
True when a bound is present (integer or tensor); absent = open.
Declared in ClikaRT/compute/tensor.h, line 801
is_tensor()
bool is_tensor() const
True for the tensor arm.
Declared in ClikaRT/compute/tensor.h, line 803
is_int()
bool is_int() const
True for the integer arm.
Declared in ClikaRT/compute/tensor.h, line 805
int_value()
std::int64_t int_value() const
The integer bound; meaningful when is_int().
Declared in ClikaRT/compute/tensor.h, line 807
tensor()
const Tensor& tensor() const
The tensor bound; meaningful when is_tensor().
Declared in ClikaRT/compute/tensor.h, line 809