Visible to Intel only — GUID: GUID-FB3626FB-D2EE-483D-A5D9-371F23FD665F
Visible to Intel only — GUID: GUID-FB3626FB-D2EE-483D-A5D9-371F23FD665F
Logical Intrinsics
The prototypes for Intel® Streaming SIMD Extensions (Intel® SSE) intrinsics for logical operations are in the xmmintrin.h header file.
To use these intrinsics, include the immintrin.h file as follows:
#include <immintrin.h>
The results of each intrinsic operation are placed in a register. This register is illustrated for each intrinsic with R0-R3. R0, R1, R2, and R3 each represent one of the four 32-bit pieces of the result register.
Intrinsic Name |
Operation |
Corresponding |
---|---|---|
_mm_and_ps |
Bitwise AND |
ANDPS |
_mm_andnot_ps |
Bitwise ANDNOT |
ANDNPS |
_mm_or_ps |
Bitwise OR |
ORPS |
_mm_xor_ps |
Bitwise Exclusive OR |
XORPS |
_mm_and_ps
__m128 _mm_and_ps(__m128 a, __m128 b);
Computes the bitwise AND of the four SP FP values of a and b.
R0 |
R1 |
R2 |
R3 |
---|---|---|---|
a0 & b0 |
a1 & b1 |
a2 & b2 |
a3 & b3 |
_mm_andnot_ps
__m128 _mm_andnot_ps(__m128 a, __m128 b);
Computes the bitwise AND-NOT of the four SP FP values of a and b.
R0 |
R1 |
R2 |
R3 |
---|---|---|---|
~a0 & b0 |
~a1 & b1 |
~a2 & b2 |
~a3 & b3 |
_mm_or_ps
__m128 _mm_or_ps(__m128 a, __m128 b);
Computes the bitwise OR of the four SP FP values of a and b.
R0 |
R1 |
R2 |
R3 |
---|---|---|---|
a0 | b0 |
a1 | b1 |
a2 | b2 |
a3 | b3 |
_mm_xor_ps
__m128 _mm_xor_ps(__m128 a, __m128 b);
Computes bitwise XOR (exclusive-or) of the four SP FP values of a and b.
R0 |
R1 |
R2 |
R3 |
---|---|---|---|
a0 ^ b0 |
a1 ^ b1 |
a2 ^ b2 |
a3 ^ b3 |