Convert
On this Page
Convert¶
High-level convert¶
Converts the value from one data type to another data type. The source and destination operands can be vectors of 8/16/32 bit signed and unsigned integers, 32 bit float ,16 bit bfloat.
Intrinsics Prototype and Arguments
float64 convert_int64_to_float64(int64 a, const int options) |
float64 convert_uint64_to_float64(uint64 a, const int options) |
float128 convert_bfloat128_to_float128(bfloat128 a, const int options) |
float128 convert_int128_to_float128(int128 a, const int options) |
float128 convert_uint128_to_float128(uint128 a, const int options) |
float128 convert_short128_to_float128(short128 a, const int options) |
float128 convert_ushort128_to_float128(ushort128 a, const int options) |
float256 convert_bfloat256_to_float256(bfloat256 a, const int options) |
float256 convert_int256_to_float256(int256 a, const int options) |
float256 convert_uint256_to_float256(uint256 a, const int options) |
float256 convert_short256_to_float256(short256 a, const int options) |
float256 convert_ushort256_to_float256(ushort256 a, const int options) |
float256 convert_char256_to_float256(char256 a, const int options) |
float256 convert_uchar256_to_float256(uchar256 a, const int options) |
bfloat128 convert_float128_to_bfloat128(float128 a, const int options) |
bfloat128 convert_int128_to_bfloat128(int128 a, const int options) |
bfloat128 convert_uint128_to_bfloat128(uint128 a, const int options) |
bfloat128 convert_short128_to_bfloat128(short128 a, const int options) |
bfloat128 convert_ushort128_to_bfloat128(ushort128 a, const int options) |
bfloat256 convert_float256_to_bfloat256(float256 a, const int options) |
bfloat256 convert_int256_to_bfloat256(int256 a, const int options) |
bfloat256 convert_uint256_to_bfloat256(uint256 a, const int options) |
bfloat256 convert_short256_to_bfloat256(short256 a, const int options) |
bfloat256 convert_ushort256_to_bfloat256(ushort256 a, const int options) |
bfloat256 convert_char256_to_bfloat256(char256 a, const int options) |
bfloat256 convert_uchar256_to_bfloat256(uchar256 a, const int options) |
half256 convert_bfloat256_to_half256(bfloat256 a, const int options) |
half256 convert_int256_to_half256(int256 a, const int options) |
half256 convert_uint256_to_half256(uint256 a, const int options) |
half256 convert_short256_to_half256(short256 a, const int options) |
half256 convert_ushort256_to_half256(ushort256 a, const int options) |
half256 convert_char256_to_half256(char256 a, const int options) |
half256 convert_uchar256_to_half256(uchar256 a, const int options) |
int64 convert_float64_to_int64(float64 a, const int options) |
int64 convert_uint64_to_int64(uint64 a, const int options) |
int128 convert_bfloat128_to_int128(bfloat128 a, const int options) |
int128 convert_float128_to_int128(float128 a, const int options) |
int128 convert_uint128_to_int128(uint128 a, const int options) |
int128 convert_short128_to_int128(short128 a, const int options) |
int128 convert_ushort128_to_int128(ushort128 a, const int options) |
int256 convert_bfloat256_to_int256(bfloat256 a, const int options) |
int256 convert_float256_to_int256(float256 a, const int options) |
int256 convert_uint256_to_int256(uint256 a, const int options) |
int256 convert_short256_to_int256(short256 a, const int options) |
int256 convert_ushort256_to_int256(ushort256 a, const int options) |
int256 convert_char256_to_int256(char256 a, const int options) |
int256 convert_uchar256_to_int256(uchar256 a, const int options) |
uint64 convert_float64_to_uint64(float64 a, const int options) |
uint64 convert_int64_to_uint64(int64 a, const int options) |
uint128 convert_bfloat128_to_uint128(bfloat128 a, const int options) |
uint128 convert_float128_to_uint128(float128 a, const int options) |
uint128 convert_int128_to_uint128(int128 a, const int options) |
uint128 convert_short128_to_uint128(short128 a, const int options) |
uint128 convert_ushort128_to_uint128(ushort128 a, const int options) |
uint256 convert_bfloat256_to_uint256(bfloat256 a, const int options) |
uint256 convert_float256_to_uint256(float256 a, const int options) |
uint256 convert_int256_to_uint256(int256 a, const int options) |
uint256 convert_short256_to_uint256(short256 a, const int options) |
uint256 convert_ushort256_to_uint256(ushort256 a, const int options) |
uint256 convert_char256_to_uint256(char256 a, const int options) |
uint256 convert_uchar256_to_uint256(uchar256 a, const int options) |
short128 convert_bfloat128_to_short128(bfloat128 a, const int options) |
short128 convert_float128_to_short128(float128 a, const int options) |
short128 convert_int128_to_short128(int128 a, const int options) |
short128 convert_uint128_to_short128(uint128 a, const int options) |
short128 convert_ushort128_to_short128(ushort128 a, const int options) |
short256 convert_bfloat256_to_short256(bfloat256 a, const int options) |
short256 convert_float256_to_short256(float256 a, const int options) |
short256 convert_int256_to_short256(int256 a, const int options) |
short256 convert_uint256_to_short256(uint256 a, const int options) |
short256 convert_ushort256_to_short256(ushort256 a, const int options) |
short256 convert_char256_to_short256(char256 a, const int options) |
short256 convert_uchar256_to_short256(uchar256 a, const int options) |
ushort128 convert_bfloat128_to_ushort128(bfloat128 a, const int options) |
ushort128 convert_float128_to_ushort128(float128 a, const int options) |
ushort128 convert_int128_to_ushort128(int128 a, const int options) |
ushort128 convert_uint128_to_ushort128(uint128 a, const int options) |
ushort128 convert_short128_to_ushort128(short128 a, const int options) |
ushort256 convert_bfloat256_to_ushort256(bfloat256 a, const int options) |
ushort256 convert_float256_to_ushort256(float256 a, const int options) |
ushort256 convert_int256_to_ushort256(int256 a, const int options) |
ushort256 convert_uint256_to_ushort256(uint256 a, const int options) |
ushort256 convert_short256_to_ushort256(short256 a, const int options) |
ushort256 convert_char256_to_ushort256(char256 a, const int options) |
ushort256 convert_uchar256_to_ushort256(uchar256 a, const int options) |
char256 convert_bfloat256_to_char256(bfloat256 a, const int options) |
char256 convert_float256_to_char256(float256 a, const int options) |
char256 convert_int256_to_char256(int256 a, const int options) |
char256 convert_uint256_to_char256(uint256 a, const int options) |
char256 convert_short256_to_char256(short256 a, const int options) |
char256 convert_ushort256_to_char256(ushort256 a, const int options) |
char256 convert_uchar256_to_char256(uchar256 a, const int options) |
uchar256 convert_bfloat256_to_uchar256(bfloat256 a, const int options) |
uchar256 convert_float256_to_uchar256(float256 a, const int options) |
uchar256 convert_int256_to_uchar256(int256 a, const int options) |
uchar256 convert_uint256_to_uchar256(uint256 a, const int options) |
uchar256 convert_short256_to_uchar256(short256 a, const int options) |
uchar256 convert_ushort256_to_uchar256(ushort256 a, const int options) |
uchar256 convert_char256_to_uchar256(char256 a, const int options) |
a |
The value to convert. |
options |
OR’ed set of constants. Only constants that represent rounding mode are supported now. They are the same constants, that are used as switches in CONVERT intrinsics. |
Allowed switches are:
SW_LINEAR - Keep linear order of elements (relevant for up- or down-conversions). By default, elements are swizzled (grouped by interleaved lanes).
Converted value
Scalar Convert¶
Represents CONVERT instruction in scalar slot.
Intrinsics Prototype and Arguments
int32_t s_convert_f32_to_i32(float src, int switches=0, int32_t income={}, bool predicate=1, bool polarity=0) |
int16_t s_convert_f32_to_i16(float src, int switches=0, int16_t income={}, bool predicate=1, bool polarity=0) |
int8_t s_convert_f32_to_i8(float src, int switches=0, int8_t income={}, bool predicate=1, bool polarity=0) |
bf16 s_convert_f32_to_bf16(float src, int switches=0, bf16 income={}, bool predicate=1, bool polarity=0) |
float s_convert_bf16_to_f32(bf16 src, int switches=0, float income={}, bool predicate=1, bool polarity=0) |
int16_t s_convert_bf16_to_i16(bf16 src, int switches=0, int16_t income={}, bool predicate=1, bool polarity=0) |
float s_convert_i32_to_f32(int32_t src, int switches=0, float income={}, bool predicate=1, bool polarity=0) |
uint32_t s_convert_i32_to_u32(int32_t src, int switches=0, uint32_t income={}, bool predicate=1, bool polarity=0) |
bf16 s_convert_i32_to_bf16(int32_t src, int switches=0, bf16 income={}, bool predicate=1, bool polarity=0) |
float s_convert_i16_to_f32(int16_t src, int switches=0, float income={}, bool predicate=1, bool polarity=0) |
int32_t s_convert_i16_to_i32(int16_t src, int switches=0, int32_t income={}, bool predicate=1, bool polarity=0) |
uint32_t s_convert_i16_to_u32(int16_t src, int switches=0, uint32_t income={}, bool predicate=1, bool polarity=0) |
uint16_t s_convert_i16_to_u16(int16_t src, int switches=0, uint16_t income={}, bool predicate=1, bool polarity=0) |
uint8_t s_convert_i16_to_u8(int16_t src, int switches=0, uint8_t income={}, bool predicate=1, bool polarity=0) |
bf16 s_convert_i16_to_bf16(int16_t src, int switches=0, bf16 income={}, bool predicate=1, bool polarity=0) |
float s_convert_i8_to_f32(int8_t src, int switches=0, float income={}, bool predicate=1, bool polarity=0) |
int32_t s_convert_i8_to_i32(int8_t src, int switches=0, int32_t income={}, bool predicate=1, bool polarity=0) |
uint32_t s_convert_i8_to_u32(int8_t src, int switches=0, uint32_t income={}, bool predicate=1, bool polarity=0) |
int16_t s_convert_i8_to_i16(int8_t src, int switches=0, int16_t income={}, bool predicate=1, bool polarity=0) |
uint16_t s_convert_i8_to_u16(int8_t src, int switches=0, uint16_t income={}, bool predicate=1, bool polarity=0) |
uint8_t s_convert_i8_to_u8(int8_t src, int switches=0, uint8_t income={}, bool predicate=1, bool polarity=0) |
bf16 s_convert_i8_to_bf16(uint8_t src, int switches=0, bf16 income={}, bool predicate=1, bool polarity=0) |
bf16 s_convert_u16_to_bf16(uint16_t src, int switches=0, bf16 income={}, bool predicate=1, bool polarity=0) |
src |
The value to convert (SRC1). |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RZ - Round zero.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
SW_RHAZ - Round half away from zero.
SW_CSR - Take rounding mode from ROUND_CSR register
Converted value.
Vector Convert¶
Represents CONVERT instruction in vector slot, in which the result vector element is of the same size as the source one.
Intrinsics Prototype and Arguments
int64 v_convert_f32_to_i32_b(float64 src, int switches=0, int64 income={}, bool predicate=1, bool polarity=0) |
int64 v_convert_f32_to_i32_vb(float64 src, int switches, int64 income, bool64 predicate, bool polarity=0) |
short128 v_convert_bf16_to_i16_b(bfloat128 src, int switches=0, short128 income={}, bool predicate=1, bool polarity=0) |
short128 v_convert_bf16_to_i16_vb(bfloat128 src, int switches, short128 income, bool128 predicate, bool polarity=0) |
float64 v_convert_i32_to_f32_b(int64 src, int switches=0, float64 income={}, bool predicate=1, bool polarity=0) |
float64 v_convert_i32_to_f32_vb(int64 src, int switches, float64 income, bool64 predicate, bool polarity=0) |
uint64 v_convert_i32_to_u32_b(int64 src, int switches=0, uint64 income={}, bool predicate=1, bool polarity=0) |
uint64 v_convert_i32_to_u32_vb(int64 src, int switches, uint64 income, bool64 predicate, bool polarity=0) |
ushort128 v_convert_i16_to_u16_b(short128 src, int switches=0, ushort128 income={}, bool predicate=1, bool polarity=0) |
ushort128 v_convert_i16_to_u16_vb(short128 src, int switches, ushort128 income, bool128 predicate, bool polarity=0) |
bfloat128 v_convert_i16_to_bf16_b(short128 src, int switches=0, bfloat128 income={}, bool predicate=1, bool polarity=0) |
bfloat128 v_convert_i16_to_bf16_vb(short128 src, int switches, bfloat128 income, bool128 predicate, bool polarity=0) |
bfloat128 v_convert_u16_to_bf16_b(ushort128 src, int switches=0, bfloat128 income={}, bool predicate=1, bool polarity=0) |
bfloat128 v_convert_u16_to_bf16_vb(ushort128 src, int switches, bfloat128 income, bool128 predicate, bool polarity=0) |
uchar256 v_convert_i8_to_u8_b(char256 src, int switches=0, uchar256 income={}, bool predicate=1, bool polarity=0) |
uchar256 v_convert_i8_to_u8_vb(char256 src, int switches, uchar256 income, bool256 predicate, bool polarity=0) |
src |
The value to convert (SRC1). |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RZ - Round zero.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
SW_RHAZ - Round half away from zero.
SW_CSR - Take rounding mode from ROUND_CSR register
Converted value.
Upconvert¶
Represents CONVERT instruction in vector slot in which result vector element is wider then the source one (up-convert).
Intrinsics Prototype and Arguments
float64 v_convert_i16_to_f32_b(short128 src, int switches=0, float64 income={}, bool predicate=1, bool polarity=0) |
float64 v_convert_i16_to_f32_vb(short128 src, int switches, float64 income, bool64 predicate, bool polarity=0) |
int64 v_convert_i16_to_i32_b(short128 src, int switches=0, int64 income={}, bool predicate=1, bool polarity=0) |
int64 v_convert_i16_to_i32_vb(short128 src, int switches, int64 income, bool64 predicate, bool polarity=0) |
uint64 v_convert_i16_to_u32_b(short128 src, int switches=0, uint64 income={}, bool predicate=1, bool polarity=0) |
uint64 v_convert_i16_to_u32_vb(short128 src, int switches, uint64 income, bool64 predicate, bool polarity=0) |
float64 v_convert_i8_to_f32_b(char256 src, int switches=0, float64 income={}, bool predicate=1, bool polarity=0) |
float64 v_convert_i8_to_f32_vb(char256 src, int switches, float64 income, bool64 predicate, bool polarity=0) |
int64 v_convert_i8_to_i32_b(char256 src, int switches=0, int64 income={}, bool predicate=1, bool polarity=0) |
int64 v_convert_i8_to_i32_vb(char256 src, int switches, int64 income, bool64 predicate, bool polarity=0) |
uint64 v_convert_i8_to_u32_b(char256 src, int switches=0, uint64 income={}, bool predicate=1, bool polarity=0) |
uint64 v_convert_i8_to_u32_vb(char256 src, int switches, uint64 income, bool64 predicate, bool polarity=0) |
short128 v_convert_i8_to_i16_b(char256 src, int switches=0, short128 income={}, bool predicate=1, bool polarity=0) |
short128 v_convert_i8_to_i16_vb(char256 src, int switches, short128 income, bool128 predicate, bool polarity=0) |
ushort128 v_convert_i8_to_u16_b(char256 src, int switches=0, ushort128 income={}, bool predicate=1, bool polarity=0) |
ushort128 v_convert_i8_to_u16_vb(char256 src, int switches, ushort128 income, bool128 predicate, bool polarity=0) |
src |
The value to convert (SRC1). |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RZ - Round zero.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
SW_RHAZ - Round half away from zero.
SW_CSR - Take rounding mode from ROUND_CSR register
Converted value.
Down Convert¶
Represents CONVERT instruction in vector slot in which result vector element is shorter then the source one (down-convert).
Intrinsics Prototype and Arguments
short128 v_convert_f32_to_i16_b(float64 src, const int lane, int switches, short128 income, bool predicate=1, bool polarity=0) |
short128 v_convert_f32_to_i16_vb(float64 src, const int lane, int switches, short128 income, bool128 predicate, bool polarity=0) |
char256 v_convert_f32_to_i8_b(float64 src, const int lane, int switches, char256 income, bool predicate=1, bool polarity=0) |
char256 v_convert_f32_to_i8_vb(float64 src, const int lane, int switches, char256 income, bool256 predicate, bool polarity=0) |
bfloat128 v_convert_i32_to_bf16_b(int64 src, const int lane, int switches, bfloat128 income, bool predicate=1, bool polarity=0) |
bfloat128 v_convert_i32_to_bf16_vb(int64 src, const int lane, int switches, bfloat128 income, bool64 predicate, bool polarity=0) |
uchar256 v_convert_i16_to_u8_b(short128 src, const int lane, int switches, uchar256 income, bool predicate=1, bool polarity=0) |
uchar256 v_convert_i16_to_u8_vb(short128 src, const int lane, int switches, uchar256 income, bool128 predicate, bool polarity=0) |
char256 v_convert_i16_to_i8_b(short128 src, const int lane, int switches, char256 income, bool predicate=1, bool polarity=0) |
char256 v_convert_i16_to_i8_vb(short128 src, const int lane, int switches, char256 income, bool128 predicate, bool polarity=0) |
src |
The value to convert (SRC1). |
lane |
The lane in output vector to which result of conversion is written, (0: all even lanes, 1: all odd lanes). For f32 to i16, only lanes 0-1 are available. For f32 to i8, all lanes 0-3 are available. |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RZ - Round zero.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
SW_RHAZ - Round half away from zero.
SW_CSR - Take rounding mode from ROUND_CSR register
Converted value.
Convert using Single Lane¶
Represents CONVERT instruction in vector slot that make move 1xFP32 to 1xBF16/F16 (lane 0 only), which means the 64 values will be assigned into the 128 elements vector in every other lane. E.g. 0,2,4,6 … 126.
Intrinsics Prototype and Arguments
bfloat128 v_convert_f32_to_bf16_single_b(float64 src, int switches, bfloat128 income, bool predicate=1, bool polarity=0) |
bfloat128 v_convert_f32_to_bf16_single_vb(float64 src, int switches, bfloat128 income, bool128 predicate, bool polarity=0) |
src |
The value to convert (SRC1). |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RZ - Round zero.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
SW_RHAZ - Round half away from zero.
SW_CSR - Take rounding mode from ROUND_CSR register
Converted value.
Convert using All Lanes¶
Represents CONVERT instruction in vector slot with ALL_LANES switch, converts all lanes and vector element size of source and destination is different.
Intrinsics Prototype and Arguments
bfloat128 v_convert_f32_to_bf16_all_b(float128 src, int switches=0, bfloat128 income={}, bool predicate=1, bool polarity=0) |
float128 v_convert_bf16_to_f32_all_b(bfloat128 src, int switches=0, float128 income={}, bool predicate=1, bool polarity=0) |
float128 v_convert_bf16_to_f32_all_vb(bfloat128 src, int switches, float128 income, bool128 predicate, bool polarity=0) |
src |
The value to convert (SRC1). |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RZ - Round zero.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
SW_RHAZ - Round half away from zero.
SW_CSR - Take rounding mode from ROUND_CSR register
Converted value.
Scalar Convert INT32¶
Represents scalar CONVERT_INT32 instruction.
Intrinsics Prototype and Arguments
int16_t s_convert_int32_to_i16(int32_t value, int32_t shift, int switches=0, int16_t income={}, bool predicate=1, bool polarity=0) |
int8_t s_convert_int32_to_i8(int32_t value, int32_t shift, int switches=0, int8_t income={}, bool predicate=1, bool polarity=0) |
value |
The value to convert (SRC1). |
shift |
The shift argument to CONVERT_INT32 (SRC2). |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RZ - Round zero.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
Converted value.
Vector Convert INT32¶
Represents vector CONVERT_INT32 instruction.
Intrinsics Prototype and Arguments
short128 v_convert_int32_to_i16_b(int64 value, char256 shift, const int lane, int switches, short128 income, bool predicate=1, bool polarity=0) |
short128 v_convert_int32_to_i16_vb(int64 value, char256 shift, const int lane, int switches, short128 income, bool64 predicate, bool polarity=0) |
char256 v_convert_int32_to_i8_b(int64 value, char256 shift, const int lane, int switches, char256 income, bool predicate=1, bool polarity=0) |
char256 v_convert_int32_to_i8_vb(int64 value, char256 shift, const int lane, int switches, char256 income, bool64 predicate, bool polarity=0) |
value |
The value to convert (SRC1). |
shift |
The shift argument to CONVERT_INT32 (SRC2). |
lane |
Lane number in the output vector, (0: all even lanes, 1: all odd lanes). For i32 to i16, only lanes 0-1 are available. For i32 to i8, all lanes 0-3 are available. |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
SW_RZ - Round zero.
Converted value.
Scalar Convert UINT32¶
Represents scalar CONVERT_UINT32 instruction.
Intrinsics Prototype and Arguments
uint16_t s_convert_uint32_to_u16(uint32_t value, int32_t shift, int switches=0, uint16_t income={}, bool predicate=1, bool polarity=0) |
uint8_t s_convert_uint32_to_u8(uint32_t value, int32_t shift, int switches=0, uint8_t income={}, bool predicate=1, bool polarity=0) |
value |
The value to convert (SRC1). |
shift |
The shift argument to CONVERT_UINT32 (SRC2). |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RZ - Round zero.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
Converted value.
Vector Convert UINT32¶
Represents vector CONVERT_UINT32 instruction.
Intrinsics Prototype and Arguments
ushort128 v_convert_uint32_to_u16_b(uint64 value, char256 shift, const int lane, int switches, ushort128 income, bool predicate=1, bool polarity=0) |
ushort128 v_convert_uint32_to_u16_vb(uint64 value, char256 shift, const int lane, int switches, ushort128 income, bool64 predicate, bool polarity=0) |
uchar256 v_convert_uint32_to_u8_b(uint64 value, char256 shift, const int lane, int switches, uchar256 income, bool predicate=1, bool polarity=0) |
uchar256 v_convert_uint32_to_u8_vb(uint64 value, char256 shift, const int lane, int switches, uchar256 income, bool64 predicate, bool polarity=0) |
value |
The value to convert (SRC1). |
shift |
The shift argument to CONVERT_UINT32 (SRC2). |
lane |
Lane number in the output vector, (0: all even lanes, 1: all odd lanes). For u32 to u16, only lanes 0-1 are available. For u32 to u8, all lanes 0-3 are available. |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
SW_RZ - Round zero.
Converted value.
Scalar Convert INT16¶
Represents scalar CONVERT_INT16 instruction.
Intrinsics Prototype and Arguments
int8_t s_convert_int16_to_i8(int16_t value, int32_t shift, int switches, int8_t income, bool predicate, bool polarity) |
value |
The value to convert (SRC1). |
shift |
The shift argument to CONVERT_INT16 (SRC2). |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RZ - Round zero.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
Converted value.
Vector Convert INT16¶
Represents vector CONVERT_INT16 instruction.
Intrinsics Prototype and Arguments
char256 v_convert_int16_to_i8_b(short128 value, char256 shift, const int lane, int switches, char256 income, bool predicate, bool polarity) |
char256 v_convert_int16_to_i8_vb(short128 value, char256 shift, const int lane, int switches, char256 income, bool128 predicate, bool polarity) |
value |
The value to convert (SRC1). |
shift |
The shift argument to CONVERT_INT16 (SRC2). |
lane |
Lane number in the output vector, (0: all even lanes, 1: all odd lanes). For i16 to i8, only lanes 0-1 are available. |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
SW_RZ - Round zero.
Converted value.
Scalar Convert UINT16¶
Represents scalar CONVERT_UINT16 instruction.
Intrinsics Prototype and Arguments
uint8_t s_convert_uint16_to_u8(uint16_t value, int32_t shift, int switches, uint8_t income, bool predicate, bool polarity) |
value |
The value to convert (SRC1). |
shift |
The shift argument to CONVERT_UINT16 (SRC2). |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RZ - Round zero.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
Converted value.
Vector Convert UINT16¶
Represents vector CONVERT_UINT16 instruction.
Intrinsics Prototype and Arguments
uchar256 v_convert_uint16_to_u8_b(ushort128 value, char256 shift, const int lane, int switches, uchar256 income, bool predicate, bool polarity) |
uchar256 v_convert_uint16_to_u8_vb(ushort128 value, char256 shift, const int lane, int switches, uchar256 income, bool128 predicate, bool polarity) |
value |
The value to convert (SRC1). |
shift |
The shift argument to CONVERT_UINT16 (SRC2). |
lane |
Lane number in the output vector, (0:all even lanes, 1:all odd lanes). For u16 to u8, only lanes 0-1 are available. |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[ROUND]
SW_RHNE - Round half to nearest even.
SW_RU - Round up.
SW_RD - Round down.
SW_SR - Stochastic Rounding.
SW_RZ - Round zero.
Converted value.