| AI Engine-ML v2 Intrinsics User Guide v2025.2

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

Vector set intrinsic functions allow setting the lanes within a vector value. More...

## Topics
| Set MX vector components
| Set sparse vector components

## Set 256-bit portion of 512-bit register
v128int4 | set_v128int4 (int idx, v64int4 b)
v128uint4 | set_v128uint4 (int idx, v64uint4 b)
v64int8 | set_v64int8 (int idx, v32int8 b)
v64uint8 | set_v64uint8 (int idx, v32uint8 b)
v16cint16 | set_v16cint16 (int idx, v8cint16 b)
v32int16 | set_v32int16 (int idx, v16int16 b)
v32uint16 | set_v32uint16 (int idx, v16uint16 b)
v8cint32 | set_v8cint32 (int idx, v4cint32 b)
v16int32 | set_v16int32 (int idx, v8int32 b)
v16uint32 | set_v16uint32 (int idx, v8uint32 b)
v32bfloat16 | set_v32bfloat16 (int idx, v16bfloat16 b)
v32float16 | set_v32float16 (int idx, v16float16 b)
v64bfloat8 | set_v64bfloat8 (int idx, v32bfloat8 b)
v64float8 | set_v64float8 (int idx, v32float8 b)
v16float | set_v16float (int idx, v8float b)
v16cbfloat16 | set_v16cbfloat16 (int idx, v8cbfloat16 b)
v8cfloat | set_v8cfloat (int idx, v4cfloat b)
v16accfloat | set_v16accfloat (int idx, v8accfloat b)
v8caccfloat | set_v8caccfloat (int idx, v4caccfloat b)
v16acc32 | set_v16acc32 (int idx, v8acc32 b)
v8acc64 | set_v8acc64 (int idx, v4acc64 b)
v4cacc64 | set_v4cacc64 (int idx, v2cacc64 b)

## Set 256-bit portion of 1024-bit register
v256int4 | set_v256int4 (int idx, v64int4 b)
v256uint4 | set_v256uint4 (int idx, v64uint4 b)
v128int8 | set_v128int8 (int idx, v32int8 b)
v128uint8 | set_v128uint8 (int idx, v32uint8 b)
v32cint16 | set_v32cint16 (int idx, v8cint16 b)
v64int16 | set_v64int16 (int idx, v16int16 b)
v64uint16 | set_v64uint16 (int idx, v16uint16 b)
v16cint32 | set_v16cint32 (int idx, v4cint32 b)
v32int32 | set_v32int32 (int idx, v8int32 b)
v32uint32 | set_v32uint32 (int idx, v8uint32 b)
v64bfloat16 | set_v64bfloat16 (int idx, v16bfloat16 b)
v64float16 | set_v64float16 (int idx, v16float16 b)
v128bfloat8 | set_v128bfloat8 (int idx, v32bfloat8 b)
v128float8 | set_v128float8 (int idx, v32float8 b)
v32float | set_v32float (int idx, v8float b)
v32cbfloat16 | set_v32cbfloat16 (int idx, v8cbfloat16 b)
v16cfloat | set_v16cfloat (int idx, v4cfloat b)
v32accfloat | set_v32accfloat (int idx, v8accfloat b)
v16caccfloat | set_v16caccfloat (int idx, v4caccfloat b)
v32acc32 | set_v32acc32 (int idx, v8acc32 b)
v16acc64 | set_v16acc64 (int idx, v4acc64 b)
v8cacc64 | set_v8cacc64 (int idx, v2cacc64 b)

## Set 512-bit portion of 1024-bit register
v256int4 | set_v256int4 (int idx, v128int4 b)
v256uint4 | set_v256uint4 (int idx, v128uint4 b)
v128int8 | set_v128int8 (int idx, v64int8 b)
v128uint8 | set_v128uint8 (int idx, v64uint8 b)
v32cint16 | set_v32cint16 (int idx, v16cint16 b)
v64int16 | set_v64int16 (int idx, v32int16 b)
v64uint16 | set_v64uint16 (int idx, v32uint16 b)
v16cint32 | set_v16cint32 (int idx, v8cint32 b)
v32int32 | set_v32int32 (int idx, v16int32 b)
v32uint32 | set_v32uint32 (int idx, v16uint32 b)
v32accfloat | set_v32accfloat (int idx, v16accfloat b)
v16caccfloat | set_v16caccfloat (int idx, v8caccfloat b)
v32acc32 | set_v32acc32 (int idx, v16acc32 b)
v16acc64 | set_v16acc64 (int idx, v8acc64 b)
v8cacc64 | set_v8cacc64 (int idx, v4cacc64 b)
v64bfloat16 | set_v64bfloat16 (int idx, v32bfloat16 b)
v64float16 | set_v64float16 (int idx, v32float16 b)
v128bfloat8 | set_v128bfloat8 (int idx, v64bfloat8 b)
v128float8 | set_v128float8 (int idx, v64float8 b)
v32float | set_v32float (int idx, v16float b)
v32cbfloat16 | set_v32cbfloat16 (int idx, v16cbfloat16 b)
v16cfloat | set_v16cfloat (int idx, v8cfloat b)

## Set 512-bit portion of 2048-bit register
v64accfloat | set_v64accfloat (int idx, v16accfloat b)
v32caccfloat | set_v32caccfloat (int idx, v8caccfloat b)
v64acc32 | set_v64acc32 (int idx, v16acc32 b)
v32acc64 | set_v32acc64 (int idx, v8acc64 b)
v16cacc64 | set_v16cacc64 (int idx, v4cacc64 b)

## Set 1024-bit portion of 2048-bit register
v64accfloat | set_v64accfloat (int idx, v32accfloat b)
v32caccfloat | set_v32caccfloat (int idx, v16caccfloat b)
v64acc32 | set_v64acc32 (int idx, v32acc32 b)
v32acc64 | set_v32acc64 (int idx, v16acc64 b)
v16cacc64 | set_v16cacc64 (int idx, v8cacc64 b)

## Set 128-bit portion of 512-bit register
v128int4 | set_v128int4 (int idx, v32int4 a)
v128uint4 | set_v128uint4 (int idx, v32uint4 a)
v64int8 | set_v64int8 (int idx, v16int8 a)
v64uint8 | set_v64uint8 (int idx, v16uint8 a)
v16cint16 | set_v16cint16 (int idx, v4cint16 a)
v32int16 | set_v32int16 (int idx, v8int16 a)
v32uint16 | set_v32uint16 (int idx, v8uint16 a)
v8cint32 | set_v8cint32 (int idx, v2cint32 a)
v16int32 | set_v16int32 (int idx, v4int32 a)
v16uint32 | set_v16uint32 (int idx, v4uint32 a)
v32bfloat16 | set_v32bfloat16 (int idx, v8bfloat16 a)
v32float16 | set_v32float16 (int idx, v8float16 a)
v64bfloat8 | set_v64bfloat8 (int idx, v16bfloat8 a)
v64float8 | set_v64float8 (int idx, v16float8 a)
v16float | set_v16float (int idx, v4float a)
v16cbfloat16 | set_v16cbfloat16 (int idx, v4cbfloat16 a)
v8cfloat | set_v8cfloat (int idx, v2cfloat a)

## Set 128-bit portion of 256-bit register
v64int4 | set_v64int4 (int idx, v32int4 a)
v64uint4 | set_v64uint4 (int idx, v32uint4 a)
v32int8 | set_v32int8 (int idx, v16int8 a)
v32uint8 | set_v32uint8 (int idx, v16uint8 a)
v8cint16 | set_v8cint16 (int idx, v4cint16 a)
v16int16 | set_v16int16 (int idx, v8int16 a)
v16uint16 | set_v16uint16 (int idx, v8uint16 a)
v4cint32 | set_v4cint32 (int idx, v2cint32 a)
v8int32 | set_v8int32 (int idx, v4int32 a)
v8uint32 | set_v8uint32 (int idx, v4uint32 a)
v16bfloat16 | set_v16bfloat16 (int idx, v8bfloat16 a)
v16float16 | set_v16float16 (int idx, v8float16 a)
v32bfloat8 | set_v32bfloat8 (int idx, v16bfloat8 a)
v32float8 | set_v32float8 (int idx, v16float8 a)
v8float | set_v8float (int idx, v4float a)
v8cbfloat16 | set_v8cbfloat16 (int idx, v4cbfloat16 a)
v4cfloat | set_v4cfloat (int idx, v2cfloat a)

## Detailed Description

Vector set intrinsic functions allow setting the lanes within a vector value.

Below the buffer sizes are as follows: W - 256 bit X - 512 bit Y - 1024 bit

For more information see Integer Vector Types.

Note
  All intrinsics require a compile time constant for the idx parameter except those in either of the following two forms:
  - upd_w(Y buf,int idx,W val)

### upd_hi and upd_lo intrinsic functions

Update the top half or bottom half of the lanes within a data type.

### upd_w({X,Y} buf,int idx,W val) 256-bit intrinsic functions

`upd_w(buf,0...3,val)` update the successive 256-bit lanes into a 512/1024 bit vector.

The following example shows the update of a large 32-way complex vector 16 elements at-a-time using a 256-bit update. These updates are also pipelined.

const v16int16 * input = d_in;
v64int16 sbuff = undef_v64int16();
...
sbuff = upd_w(sbuff,0, *input_++); // 00++|08++|____|____ ____|____|____|____
sbuff = upd_w(sbuff,1, *input_++); // 00..|08..|16++|24++ ____|____|____|____
v64int16
Definition me_chess.h:535
v16int16
Definition me_chess.h:511
undef_v64int16
v64int16 undef_v64int16()

### wset, xset, yset

Same as update but set value of new buf and not one that exists already. For example:

wset_w(idx,val) is the same as upd_w(undef_type(),idx,val)

## Function Documentation

## ◆ set_v128bfloat8() [1/2]

v128bfloat8 set_v128bfloat8 | ( | int | idx,
|  | v32bfloat8 | b )

## ◆ set_v128bfloat8() [2/2]

v128bfloat8 set_v128bfloat8 | ( | int | idx,
|  | v64bfloat8 | b )

## ◆ set_v128float8() [1/2]

v128float8 set_v128float8 | ( | int | idx,
|  | v32float8 | b )

## ◆ set_v128float8() [2/2]

v128float8 set_v128float8 | ( | int | idx,
|  | v64float8 | b )

## ◆ set_v128int4() [1/2]

v128int4 set_v128int4 | ( | int | idx,
|  | v32int4 | a )

## ◆ set_v128int4() [2/2]

v128int4 set_v128int4 | ( | int | idx,
|  | v64int4 | b )

## ◆ set_v128int8() [1/2]

v128int8 set_v128int8 | ( | int | idx,
|  | v32int8 | b )

## ◆ set_v128int8() [2/2]

v128int8 set_v128int8 | ( | int | idx,
|  | v64int8 | b )

## ◆ set_v128uint4() [1/2]

v128uint4 set_v128uint4 | ( | int | idx,
|  | v32uint4 | a )

## ◆ set_v128uint4() [2/2]

v128uint4 set_v128uint4 | ( | int | idx,
|  | v64uint4 | b )

## ◆ set_v128uint8() [1/2]

v128uint8 set_v128uint8 | ( | int | idx,
|  | v32uint8 | b )

## ◆ set_v128uint8() [2/2]

v128uint8 set_v128uint8 | ( | int | idx,
|  | v64uint8 | b )

## ◆ set_v16acc32()

v16acc32 set_v16acc32 | ( | int | idx,
|  | v8acc32 | b )

## ◆ set_v16acc64() [1/2]

v16acc64 set_v16acc64 | ( | int | idx,
|  | v4acc64 | b )

## ◆ set_v16acc64() [2/2]

v16acc64 set_v16acc64 | ( | int | idx,
|  | v8acc64 | b )

## ◆ set_v16accfloat()

v16accfloat set_v16accfloat | ( | int | idx,
|  | v8accfloat | b )

## ◆ set_v16bfloat16()

v16bfloat16 set_v16bfloat16 | ( | int | idx,
|  | v8bfloat16 | a )

## ◆ set_v16cacc64() [1/2]

v16cacc64 set_v16cacc64 | ( | int | idx,
|  | v4cacc64 | b )

## ◆ set_v16cacc64() [2/2]

v16cacc64 set_v16cacc64 | ( | int | idx,
|  | v8cacc64 | b )

## ◆ set_v16caccfloat() [1/2]

v16caccfloat set_v16caccfloat | ( | int | idx,
|  | v4caccfloat | b )

## ◆ set_v16caccfloat() [2/2]

v16caccfloat set_v16caccfloat | ( | int | idx,
|  | v8caccfloat | b )

## ◆ set_v16cbfloat16() [1/2]

v16cbfloat16 set_v16cbfloat16 | ( | int | idx,
|  | v4cbfloat16 | a )

## ◆ set_v16cbfloat16() [2/2]

v16cbfloat16 set_v16cbfloat16 | ( | int | idx,
|  | v8cbfloat16 | b )

## ◆ set_v16cfloat() [1/2]

v16cfloat set_v16cfloat | ( | int | idx,
|  | v4cfloat | b )

## ◆ set_v16cfloat() [2/2]

v16cfloat set_v16cfloat | ( | int | idx,
|  | v8cfloat | b )

## ◆ set_v16cint16() [1/2]

v16cint16 set_v16cint16 | ( | int | idx,
|  | v4cint16 | a )

## ◆ set_v16cint16() [2/2]

v16cint16 set_v16cint16 | ( | int | idx,
|  | v8cint16 | b )

## ◆ set_v16cint32() [1/2]

v16cint32 set_v16cint32 | ( | int | idx,
|  | v4cint32 | b )

## ◆ set_v16cint32() [2/2]

v16cint32 set_v16cint32 | ( | int | idx,
|  | v8cint32 | b )

## ◆ set_v16float() [1/2]

v16float set_v16float | ( | int | idx,
|  | v4float | a )

## ◆ set_v16float() [2/2]

v16float set_v16float | ( | int | idx,
|  | v8float | b )

## ◆ set_v16float16()

v16float16 set_v16float16 | ( | int | idx,
|  | v8float16 | a )

## ◆ set_v16int16()

v16int16 set_v16int16 | ( | int | idx,
|  | v8int16 | a )

## ◆ set_v16int32() [1/2]

v16int32 set_v16int32 | ( | int | idx,
|  | v4int32 | a )

## ◆ set_v16int32() [2/2]

v16int32 set_v16int32 | ( | int | idx,
|  | v8int32 | b )

## ◆ set_v16uint16()

v16uint16 set_v16uint16 | ( | int | idx,
|  | v8uint16 | a )

## ◆ set_v16uint32() [1/2]

v16uint32 set_v16uint32 | ( | int | idx,
|  | v4uint32 | a )

## ◆ set_v16uint32() [2/2]

v16uint32 set_v16uint32 | ( | int | idx,
|  | v8uint32 | b )

## ◆ set_v256int4() [1/2]

v256int4 set_v256int4 | ( | int | idx,
|  | v128int4 | b )

## ◆ set_v256int4() [2/2]

v256int4 set_v256int4 | ( | int | idx,
|  | v64int4 | b )

## ◆ set_v256uint4() [1/2]

v256uint4 set_v256uint4 | ( | int | idx,
|  | v128uint4 | b )

## ◆ set_v256uint4() [2/2]

v256uint4 set_v256uint4 | ( | int | idx,
|  | v64uint4 | b )

## ◆ set_v32acc32() [1/2]

v32acc32 set_v32acc32 | ( | int | idx,
|  | v16acc32 | b )

## ◆ set_v32acc32() [2/2]

v32acc32 set_v32acc32 | ( | int | idx,
|  | v8acc32 | b )

## ◆ set_v32acc64() [1/2]

v32acc64 set_v32acc64 | ( | int | idx,
|  | v16acc64 | b )

## ◆ set_v32acc64() [2/2]

v32acc64 set_v32acc64 | ( | int | idx,
|  | v8acc64 | b )

## ◆ set_v32accfloat() [1/2]

v32accfloat set_v32accfloat | ( | int | idx,
|  | v16accfloat | b )

## ◆ set_v32accfloat() [2/2]

v32accfloat set_v32accfloat | ( | int | idx,
|  | v8accfloat | b )

## ◆ set_v32bfloat16() [1/2]

v32bfloat16 set_v32bfloat16 | ( | int | idx,
|  | v16bfloat16 | b )

## ◆ set_v32bfloat16() [2/2]

v32bfloat16 set_v32bfloat16 | ( | int | idx,
|  | v8bfloat16 | a )

## ◆ set_v32bfloat8()

v32bfloat8 set_v32bfloat8 | ( | int | idx,
|  | v16bfloat8 | a )

## ◆ set_v32caccfloat() [1/2]

v32caccfloat set_v32caccfloat | ( | int | idx,
|  | v16caccfloat | b )

## ◆ set_v32caccfloat() [2/2]

v32caccfloat set_v32caccfloat | ( | int | idx,
|  | v8caccfloat | b )

## ◆ set_v32cbfloat16() [1/2]

v32cbfloat16 set_v32cbfloat16 | ( | int | idx,
|  | v16cbfloat16 | b )

## ◆ set_v32cbfloat16() [2/2]

v32cbfloat16 set_v32cbfloat16 | ( | int | idx,
|  | v8cbfloat16 | b )

## ◆ set_v32cint16() [1/2]

v32cint16 set_v32cint16 | ( | int | idx,
|  | v16cint16 | b )

## ◆ set_v32cint16() [2/2]

v32cint16 set_v32cint16 | ( | int | idx,
|  | v8cint16 | b )

## ◆ set_v32float() [1/2]

v32float set_v32float | ( | int | idx,
|  | v16float | b )

## ◆ set_v32float() [2/2]

v32float set_v32float | ( | int | idx,
|  | v8float | b )

## ◆ set_v32float16() [1/2]

v32float16 set_v32float16 | ( | int | idx,
|  | v16float16 | b )

## ◆ set_v32float16() [2/2]

v32float16 set_v32float16 | ( | int | idx,
|  | v8float16 | a )

## ◆ set_v32float8()

v32float8 set_v32float8 | ( | int | idx,
|  | v16float8 | a )

## ◆ set_v32int16() [1/2]

v32int16 set_v32int16 | ( | int | idx,
|  | v16int16 | b )

## ◆ set_v32int16() [2/2]

v32int16 set_v32int16 | ( | int | idx,
|  | v8int16 | a )

## ◆ set_v32int32() [1/2]

v32int32 set_v32int32 | ( | int | idx,
|  | v16int32 | b )

## ◆ set_v32int32() [2/2]

v32int32 set_v32int32 | ( | int | idx,
|  | v8int32 | b )

## ◆ set_v32int8()

v32int8 set_v32int8 | ( | int | idx,
|  | v16int8 | a )

## ◆ set_v32uint16() [1/2]

v32uint16 set_v32uint16 | ( | int | idx,
|  | v16uint16 | b )

## ◆ set_v32uint16() [2/2]

v32uint16 set_v32uint16 | ( | int | idx,
|  | v8uint16 | a )

## ◆ set_v32uint32() [1/2]

v32uint32 set_v32uint32 | ( | int | idx,
|  | v16uint32 | b )

## ◆ set_v32uint32() [2/2]

v32uint32 set_v32uint32 | ( | int | idx,
|  | v8uint32 | b )

## ◆ set_v32uint8()

v32uint8 set_v32uint8 | ( | int | idx,
|  | v16uint8 | a )

## ◆ set_v4cacc64()

v4cacc64 set_v4cacc64 | ( | int | idx,
|  | v2cacc64 | b )

## ◆ set_v4cfloat()

v4cfloat set_v4cfloat | ( | int | idx,
|  | v2cfloat | a )

## ◆ set_v4cint32()

v4cint32 set_v4cint32 | ( | int | idx,
|  | v2cint32 | a )

## ◆ set_v64acc32() [1/2]

v64acc32 set_v64acc32 | ( | int | idx,
|  | v16acc32 | b )

## ◆ set_v64acc32() [2/2]

v64acc32 set_v64acc32 | ( | int | idx,
|  | v32acc32 | b )

## ◆ set_v64accfloat() [1/2]

v64accfloat set_v64accfloat | ( | int | idx,
|  | v16accfloat | b )

## ◆ set_v64accfloat() [2/2]

v64accfloat set_v64accfloat | ( | int | idx,
|  | v32accfloat | b )

## ◆ set_v64bfloat16() [1/2]

v64bfloat16 set_v64bfloat16 | ( | int | idx,
|  | v16bfloat16 | b )

## ◆ set_v64bfloat16() [2/2]

v64bfloat16 set_v64bfloat16 | ( | int | idx,
|  | v32bfloat16 | b )

## ◆ set_v64bfloat8() [1/2]

v64bfloat8 set_v64bfloat8 | ( | int | idx,
|  | v16bfloat8 | a )

## ◆ set_v64bfloat8() [2/2]

v64bfloat8 set_v64bfloat8 | ( | int | idx,
|  | v32bfloat8 | b )

## ◆ set_v64float16() [1/2]

v64float16 set_v64float16 | ( | int | idx,
|  | v16float16 | b )

## ◆ set_v64float16() [2/2]

v64float16 set_v64float16 | ( | int | idx,
|  | v32float16 | b )

## ◆ set_v64float8() [1/2]

v64float8 set_v64float8 | ( | int | idx,
|  | v16float8 | a )

## ◆ set_v64float8() [2/2]

v64float8 set_v64float8 | ( | int | idx,
|  | v32float8 | b )

## ◆ set_v64int16() [1/2]

v64int16 set_v64int16 | ( | int | idx,
|  | v16int16 | b )

## ◆ set_v64int16() [2/2]

v64int16 set_v64int16 | ( | int | idx,
|  | v32int16 | b )

## ◆ set_v64int4()

v64int4 set_v64int4 | ( | int | idx,
|  | v32int4 | a )

## ◆ set_v64int8() [1/2]

v64int8 set_v64int8 | ( | int | idx,
|  | v16int8 | a )

## ◆ set_v64int8() [2/2]

v64int8 set_v64int8 | ( | int | idx,
|  | v32int8 | b )

## ◆ set_v64uint16() [1/2]

v64uint16 set_v64uint16 | ( | int | idx,
|  | v16uint16 | b )

## ◆ set_v64uint16() [2/2]

v64uint16 set_v64uint16 | ( | int | idx,
|  | v32uint16 | b )

## ◆ set_v64uint4()

v64uint4 set_v64uint4 | ( | int | idx,
|  | v32uint4 | a )

## ◆ set_v64uint8() [1/2]

v64uint8 set_v64uint8 | ( | int | idx,
|  | v16uint8 | a )

## ◆ set_v64uint8() [2/2]

v64uint8 set_v64uint8 | ( | int | idx,
|  | v32uint8 | b )

## ◆ set_v8acc64()

v8acc64 set_v8acc64 | ( | int | idx,
|  | v4acc64 | b )

## ◆ set_v8cacc64() [1/2]

v8cacc64 set_v8cacc64 | ( | int | idx,
|  | v2cacc64 | b )

## ◆ set_v8cacc64() [2/2]

v8cacc64 set_v8cacc64 | ( | int | idx,
|  | v4cacc64 | b )

## ◆ set_v8caccfloat()

v8caccfloat set_v8caccfloat | ( | int | idx,
|  | v4caccfloat | b )

## ◆ set_v8cbfloat16()

v8cbfloat16 set_v8cbfloat16 | ( | int | idx,
|  | v4cbfloat16 | a )

## ◆ set_v8cfloat() [1/2]

v8cfloat set_v8cfloat | ( | int | idx,
|  | v2cfloat | a )

## ◆ set_v8cfloat() [2/2]

v8cfloat set_v8cfloat | ( | int | idx,
|  | v4cfloat | b )

## ◆ set_v8cint16()

v8cint16 set_v8cint16 | ( | int | idx,
|  | v4cint16 | a )

## ◆ set_v8cint32() [1/2]

v8cint32 set_v8cint32 | ( | int | idx,
|  | v2cint32 | a )

## ◆ set_v8cint32() [2/2]

v8cint32 set_v8cint32 | ( | int | idx,
|  | v4cint32 | b )

## ◆ set_v8float()

v8float set_v8float | ( | int | idx,
|  | v4float | a )

## ◆ set_v8int32()

v8int32 set_v8int32 | ( | int | idx,
|  | v4int32 | a )

## ◆ set_v8uint32()

v8uint32 set_v8uint32 | ( | int | idx,
|  | v4uint32 | a )