ClikaRT::spec::DimOrInt
struct
Header: ClikaRT/graph/input_specs.h
One entry of a shape given to add_input / add_output: a concrete extent, a bare dynamic marker, or a Dim object. Implicit from both spellings, so a shape list mixes them freely:
model.add_input("x", DataType::Float32, {batch, 128, -1});
An integer > 0 is a concrete extent; <= 0 is an anonymous dynamic dim (each its own); a Dim is a named / identity-tied dynamic dim.
Member functions
DimOrInt(int64_t)
DimOrInt(std::int64_t extent)
An integer entry: a concrete extent (> 0) or an anonymous dynamic marker (<= 0).
Declared in ClikaRT/graph/input_specs.h, line 105
DimOrInt(int)
DimOrInt(int extent)
The int spelling of the integer entry above.
Declared in ClikaRT/graph/input_specs.h, line 107
DimOrInt(Dim)
DimOrInt(Dim d)
A Dim entry: named or identity-tied dynamic dim.
Declared in ClikaRT/graph/input_specs.h, line 109
is_concrete()
bool is_concrete() const noexcept
True for a positive literal extent with no Dim attached.
Declared in ClikaRT/graph/input_specs.h, line 112
Data members
value
std::int64_t value = -1
the integer entry (> 0 concrete; <= 0 anonymous dynamic).
Declared in ClikaRT/graph/input_specs.h, line 101
dim
std::optional<Dim> dim
the Dim entry (named / identity-tied), when given.
Declared in ClikaRT/graph/input_specs.h, line 102