← vector dialect
Extract a scalar or tail subvector from a vector at explicit leading indices. Supplying one index consumes the first source axis, two indices consume the first two axes, and consuming all axes produces a scalar element.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
source |
vector |
required |
— |
| Operand |
indices |
index |
variadic |
— |
| Result |
result |
any |
required |
— |
| Attribute |
static_indices |
i64_array |
required |
Static indices with INT64_MIN sentinels for dynamics. |
Verification constraints
SameElementType(source, result)
Examples
%x = vector.extract %v[%i] : vector<[%n]xf32> -> f32