Skip to content

vector.iota

vector dialect

Construct a vector of lane-coordinate values. Lane order is the logical row-major order of the result shape; result lane ordinal i contains base + i * step. The result element type must be index or a non-i1 integer payload, and base/step must be scalar values with the same element type. Dynamic result extents are allowed: the result type supplies the lane count symbolically and later specialization fixes the concrete number of produced coordinates.

Operation contract

Property Value
Semantic phase
Traits Pure, RefinableResultTypeRefs
Target contracts vector.coordinate

Signature

Kind Name Type Cardinality Description
Operand base scalar required First coordinate value.
Operand step scalar required Coordinate delta between adjacent logical lanes.
Result result vector required

Verification constraints

  • HasIndexOrNonI1IntegerScalar(base)
  • SameType(base, step)
  • SameElementType(base, step, result)

Examples

%lanes = vector.iota %c0 step %c1 : vector<16xindex>
%offsets = vector.iota %base step %stride : vector<4xi32>
%dyn = vector.iota %c0 step %c1 : vector<[%n]xindex>