| AI Engine-ML Intrinsics User Guide (v2026.1)

Loading...
Searching...
No Matches
Topics
Insert vector
Vector Conversions

## Overview

Vector insert intrinsic functions allow substitution of the lanes within a vector value.

The lanes that will be subsituted depend on the size of the vector that is given as an input and the parameter idx. There are two cases:

1. Input vector fills half of the vector lanes of output vector (e.g. insert v64int8 in v128int8)
2. Input vector fills a fourth of the vector lanes of output vector (e.g. insert v32int8 in v128int8)

In the first case, idx can be zero or one. If it is zero, the vector will be inserted in the lower half, if it is one it will be inserted in the upper half.
In the second case, idx can be zero to three. If idx is zero, the vector will be inserted in the lowest quarter, if idx is one it will be inserted in the next highest quarter etc...

Note
  The untouched lanes will retain their previous values and will not be automatically cleared to zero. If a scalar is passed as an input, the intrisics insert the scalar into the lane that is given by idx.

## Topics
| Insert a vector into a vector
| Insert an element into a vector