Logical
On this Page
Logical¶
Compare Equal¶
Represents CMP_EQ instruction.
Intrinsics Prototype and Arguments
bool s_f32_cmp_eq(float a, float b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_bf16_cmp_eq(bf16 a, bf16 b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i32_cmp_eq(int32_t a, int32_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u32_cmp_eq(uint32_t a, uint32_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i16_cmp_eq(int16_t a, int16_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u16_cmp_eq(uint16_t a, uint16_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i8_cmp_eq(int8_t a, int8_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u8_cmp_eq(uint8_t a, uint8_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool64 v_f32_cmp_eq_vb(float64 a, float64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_f32_cmp_eq_b(float64 a, float64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool128 v_bf16_cmp_eq_vb(bfloat128 a, bfloat128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_bf16_cmp_eq_b(bfloat128 a, bfloat128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool64 v_i32_cmp_eq_vb(int64 a, int64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_i32_cmp_eq_b(int64 a, int64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool64 v_u32_cmp_eq_vb(uint64 a, uint64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_u32_cmp_eq_b(uint64 a, uint64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool128 v_i16_cmp_eq_vb(short128 a, short128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_i16_cmp_eq_b(short128 a, short128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool128 v_u16_cmp_eq_vb(ushort128 a, ushort128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_u16_cmp_eq_b(ushort128 a, ushort128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool256 v_i8_cmp_eq_vb(char256 a, char256 b, int switches, bool256 income, bool256 predicate, bool polarity=0) |
bool256 v_i8_cmp_eq_b(char256 a, char256 b, int switches=0, bool256 income={}, bool predicate=1, bool polarity=0) |
bool256 v_u8_cmp_eq_vb(uchar256 a, uchar256 b, int switches, bool256 income, bool256 predicate, bool polarity=0) |
bool256 v_u8_cmp_eq_b(uchar256 a, uchar256 b, int switches=0, bool256 income={}, bool predicate=1, bool polarity=0) |
a |
The first SRC operand (SRC1). |
b |
The second SRC operand (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:
SW_MASK_EQ_ZERO - Compare between (a & b) and 0.
Boolean result of comparison - a==b (scalar or vector).
Compare Greater Equal¶
Represents CMP_GEQ instruction.
Performs elementwise comparision between the first source operand and the second source operand.
Intrinsics Prototype and Arguments
bool s_f32_cmp_geq(float a, float b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_bf16_cmp_geq(bf16 a, bf16 b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i32_cmp_geq(int32_t a, int32_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u32_cmp_geq(uint32_t a, uint32_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i16_cmp_geq(int16_t a, int16_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u16_cmp_geq(uint16_t a, uint16_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i8_cmp_geq(int8_t a, int8_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u8_cmp_geq(uint8_t a, uint8_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool64 v_f32_cmp_geq_vb(float64 a, float64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_f32_cmp_geq_b(float64 a, float64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool128 v_bf16_cmp_geq_vb(bfloat128 a, bfloat128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_bf16_cmp_geq_b(bfloat128 a, bfloat128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool64 v_i32_cmp_geq_vb(int64 a, int64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_i32_cmp_geq_b(int64 a, int64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool64 v_u32_cmp_geq_vb(uint64 a, uint64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_u32_cmp_geq_b(uint64 a, uint64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool128 v_i16_cmp_geq_vb(short128 a, short128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_i16_cmp_geq_b(short128 a, short128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool128 v_u16_cmp_geq_vb(ushort128 a, ushort128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_u16_cmp_geq_b(ushort128 a, ushort128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool256 v_i8_cmp_geq_vb(char256 a, char256 b, int switches, bool256 income, bool256 predicate, bool polarity=0) |
bool256 v_i8_cmp_geq_b(char256 a, char256 b, int switches=0, bool256 income={}, bool predicate=1, bool polarity=0) |
bool256 v_u8_cmp_geq_vb(uchar256 a, uchar256 b, int switches, bool256 income, bool256 predicate, bool polarity=0) |
bool256 v_u8_cmp_geq_b(uchar256 a, uchar256 b, int switches=0, bool256 income={}, bool predicate=1, bool polarity=0) |
a |
The first SRC operand (SRC1). |
b |
The second SRC operand (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. |
Boolean result of comparison - a>=b (scalar or vector).
Compare Greater¶
Represents CMP_GRT instruction.
Intrinsics Prototype and Arguments
bool s_f32_cmp_grt(float a, float b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_bf16_cmp_grt(bf16 a, bf16 b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i32_cmp_grt(int32_t a, int32_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u32_cmp_grt(uint32_t a, uint32_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i16_cmp_grt(int16_t a, int16_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u16_cmp_grt(uint16_t a, uint16_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i8_cmp_grt(int8_t a, int8_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u8_cmp_grt(uint8_t a, uint8_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool64 v_f32_cmp_grt_vb(float64 a, float64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_f32_cmp_grt_b(float64 a, float64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool128 v_bf16_cmp_grt_vb(bfloat128 a, bfloat128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_bf16_cmp_grt_b(bfloat128 a, bfloat128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool64 v_i32_cmp_grt_vb(int64 a, int64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_i32_cmp_grt_b(int64 a, int64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool64 v_u32_cmp_grt_vb(uint64 a, uint64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_u32_cmp_grt_b(uint64 a, uint64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool128 v_i16_cmp_grt_vb(short128 a, short128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_i16_cmp_grt_b(short128 a, short128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool128 v_u16_cmp_grt_vb(ushort128 a, ushort128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_u16_cmp_grt_b(ushort128 a, ushort128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool256 v_i8_cmp_grt_vb(char256 a, char256 b, int switches, bool256 income, bool256 predicate, bool polarity=0) |
bool256 v_i8_cmp_grt_b(char256 a, char256 b, int switches=0, bool256 income={}, bool predicate=1, bool polarity=0) |
bool256 v_u8_cmp_grt_vb(uchar256 a, uchar256 b, int switches, bool256 income, bool256 predicate, bool polarity=0) |
bool256 v_u8_cmp_grt_b(uchar256 a, uchar256 b, int switches=0, bool256 income={}, bool predicate=1, bool polarity=0) |
a |
The first SRC operand (SRC1). |
b |
The second SRC operand (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. |
Boolean result of comparison - a>b (scalar or vector).
Compare Less Equal¶
Represents CMP_LEQ instruction.
Intrinsics Prototype and Arguments
bool s_f32_cmp_leq(float a, float b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_bf16_cmp_leq(bf16 a, bf16 b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i32_cmp_leq(int32_t a, int32_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u32_cmp_leq(uint32_t a, uint32_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i16_cmp_leq(int16_t a, int16_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u16_cmp_leq(uint16_t a, uint16_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i8_cmp_leq(int8_t a, int8_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u8_cmp_leq(uint8_t a, uint8_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool64 v_f32_cmp_leq_vb(float64 a, float64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_f32_cmp_leq_b(float64 a, float64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool128 v_bf16_cmp_leq_vb(bfloat128 a, bfloat128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_bf16_cmp_leq_b(bfloat128 a, bfloat128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool64 v_i32_cmp_leq_vb(int64 a, int64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_i32_cmp_leq_b(int64 a, int64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool64 v_u32_cmp_leq_vb(uint64 a, uint64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_u32_cmp_leq_b(uint64 a, uint64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool128 v_i16_cmp_leq_vb(short128 a, short128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_i16_cmp_leq_b(short128 a, short128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool128 v_u16_cmp_leq_vb(ushort128 a, ushort128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_u16_cmp_leq_b(ushort128 a, ushort128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool256 v_i8_cmp_leq_vb(char256 a, char256 b, int switches, bool256 income, bool256 predicate, bool polarity=0) |
bool256 v_i8_cmp_leq_b(char256 a, char256 b, int switches=0, bool256 income={}, bool predicate=1, bool polarity=0) |
bool256 v_u8_cmp_leq_vb(uchar256 a, uchar256 b, int switches, bool256 income, bool256 predicate, bool polarity=0) |
bool256 v_u8_cmp_leq_b(uchar256 a, uchar256 b, int switches=0, bool256 income={}, bool predicate=1, bool polarity=0) |
a |
The first SRC operand (SRC1). |
b |
The second SRC operand (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. |
Boolean result of comparison - a<=b (scalar or vector).
Compare Less¶
Represents CMP_LESS instruction.
Intrinsics Prototype and Arguments
bool s_f32_cmp_less(float a, float b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_bf16_cmp_less(bf16 a, bf16 b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i32_cmp_less(int32_t a, int32_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u32_cmp_less(uint32_t a, uint32_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i16_cmp_less(int16_t a, int16_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u16_cmp_less(uint16_t a, uint16_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i8_cmp_less(int8_t a, int8_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u8_cmp_less(uint8_t a, uint8_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool64 v_f32_cmp_less_vb(float64 a, float64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_f32_cmp_less_b(float64 a, float64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool128 v_bf16_cmp_less_vb(bfloat128 a, bfloat128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_bf16_cmp_less_b(bfloat128 a, bfloat128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool64 v_i32_cmp_less_vb(int64 a, int64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_i32_cmp_less_b(int64 a, int64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool64 v_u32_cmp_less_vb(uint64 a, uint64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_u32_cmp_less_b(uint64 a, uint64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool128 v_i16_cmp_less_vb(short128 a, short128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_i16_cmp_less_b(short128 a, short128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool128 v_u16_cmp_less_vb(ushort128 a, ushort128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_u16_cmp_less_b(ushort128 a, ushort128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool256 v_i8_cmp_less_vb(char256 a, char256 b, int switches, bool256 income, bool256 predicate, bool polarity=0) |
bool256 v_i8_cmp_less_b(char256 a, char256 b, int switches=0, bool256 income={}, bool predicate=1, bool polarity=0) |
bool256 v_u8_cmp_less_vb(uchar256 a, uchar256 b, int switches, bool256 income, bool256 predicate, bool polarity=0) |
bool256 v_u8_cmp_less_b(uchar256 a, uchar256 b, int switches=0, bool256 income={}, bool predicate=1, bool polarity=0) |
a |
The first SRC operand (SRC1). |
b |
The second SRC operand (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. |
Boolean result of comparison - a<b (scalar or vector).
Compare Not Equal¶
Represents CMP_NEQ instruction.
Intrinsics Prototype and Arguments
bool s_f32_cmp_neq(float a, float b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_bf16_cmp_neq(bf16 a, bf16 b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i32_cmp_neq(int32_t a, int32_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u32_cmp_neq(uint32_t a, uint32_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i16_cmp_neq(int16_t a, int16_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u16_cmp_neq(uint16_t a, uint16_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_i8_cmp_neq(int8_t a, int8_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool s_u8_cmp_neq(uint8_t a, uint8_t b, int switches=0, bool income={}, bool predicate=1, bool polarity=0) |
bool64 v_f32_cmp_neq_vb(float64 a, float64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_f32_cmp_neq_b(float64 a, float64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool128 v_bf16_cmp_neq_vb(bfloat128 a, bfloat128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_bf16_cmp_neq_b(bfloat128 a, bfloat128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool64 v_i32_cmp_neq_vb(int64 a, int64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_i32_cmp_neq_b(int64 a, int64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool64 v_u32_cmp_neq_vb(uint64 a, uint64 b, int switches, bool64 income, bool64 predicate, bool polarity=0) |
bool64 v_u32_cmp_neq_b(uint64 a, uint64 b, int switches=0, bool64 income={}, bool predicate=1, bool polarity=0) |
bool128 v_i16_cmp_neq_vb(short128 a, short128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_i16_cmp_neq_b(short128 a, short128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool128 v_u16_cmp_neq_vb(ushort128 a, ushort128 b, int switches, bool128 income, bool128 predicate, bool polarity=0) |
bool128 v_u16_cmp_neq_b(ushort128 a, ushort128 b, int switches=0, bool128 income={}, bool predicate=1, bool polarity=0) |
bool256 v_i8_cmp_neq_vb(char256 a, char256 b, int switches, bool256 income, bool256 predicate, bool polarity=0) |
bool256 v_i8_cmp_neq_b(char256 a, char256 b, int switches=0, bool256 income={}, bool predicate=1, bool polarity=0) |
bool256 v_u8_cmp_neq_vb(uchar256 a, uchar256 b, int switches, bool256 income, bool256 predicate, bool polarity=0) |
bool256 v_u8_cmp_neq_b(uchar256 a, uchar256 b, int switches=0, bool256 income={}, bool predicate=1, bool polarity=0) |
a |
The first SRC operand (SRC1). |
b |
The second SRC operand (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. |
Boolean result of comparison - a!=b (scalar or vector).