Developer Guide and Reference

Contents

Conditional Select Operators

For conditional select operands, the third and fourth operands determine the type returned. Third and fourth operands with same size, but different signedness, return the nearest common ancestor data type.
Conditional Select Syntax Usage
Return the nearest common ancestor data type if third and fourth operands are of the same size, but different signs.
I16vec4 R = select_neq(Is16vec4, Is16vec4, Is16vec4, Iu16vec4);
Conditional Select for Equality
R0 := (A0 == B0) ? C0 : D0;
R1 := (A1 == B1) ? C1 : D1;
R2 := (A2 == B2) ? C2 : D2;
R3 := (A3 == B3) ? C3 : D3;
Conditional Select for Inequality
R0 := (A0 != B0) ? C0 : D0;
R1 := (A1 != B1) ? C1 : D1;
R2 := (A2 != B2) ? C2 : D2;
R3 := (A3 != B3) ? C3 : D3;
Conditional Select Symbols and Corresponding Intrinsics
Conditional Select For:
Operators
Syntax
Corresponding Intrinsic
Additional Intrinsic (Applies to All)
Equality
select_eq
R = select_eq(A, B, C, D)
_mm_cmpeq_pi32
_mm_cmpeq_pi16
_mm_cmpeq_pi8
_mm_and_si64
_mm_or_si64
_mm_andnot_si64