vector.insert
← vector dialect
Insert a scalar or tail subvector into a vector at explicit leading indices. The inserted value must match the destination tail shape remaining after the supplied indices, and the result type is the same as the destination type. Each selected coordinate must be nonnegative and less than its destination axis extent.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
value |
any |
required |
— |
| Operand |
dest |
vector |
required |
— |
| Operand |
indices |
index |
variadic |
— |
| Result |
result |
vector |
required |
— |
| Attribute |
static_indices |
i64_array |
required |
Static indices with INT64_MIN sentinels for dynamics. |
Verification constraints
SameElementType(value, dest, result)
SameType(dest, result)
Examples
%r = vector.insert %x into %v[%i] : f32, vector<[%n]xf32>