Skip to content

vector.deinterleave

vector dialect

Split one vector along the template axis into two same-typed results. The first result receives even coordinates along that axis, the second receives odd coordinates, and each result extent on that axis is half of the source extent.

Operation contract

Property Value
Semantic phase
Traits Pure

Signature

Kind Name Type Cardinality Description
Operand source vector required
Result results vector variadic Even-position result followed by odd-position result.
Attribute axis i64 required Axis whose extent is halved in each result.

Verification constraints

  • SameType(results)
  • SameElementType(source, results)
  • DimIndexInBounds(source, axis)

Examples

%lo, %hi = vector.deinterleave<0> %r : vector<32xi8> -> vector<16xi8>, vector<16xi8>
%a, %b = vector.deinterleave<1> %r : vector<4x16xi8> -> vector<4x8xi8>, vector<4x8xi8>