Developer Guide and Reference

Contents

Compare Intrinsics

The prototypes for Intel® Streaming SIMD Extensions (Intel® SSE) intrinsics for comparison operations are in the
xmmintrin.h
header file.
To use these intrinsics, include the
immintrin.h
file as follows:
#include <immintrin.h>
Each comparison intrinsic performs a comparison of
a
and
b
. For the packed form, the four single-precision FP values of
a
and
b
are compared, and a 128-bit mask is returned. For the scalar form, the lower single-precision FP values of
a
and
b
are compared, and a 32-bit mask is returned; the upper three single-precision FP values are passed through from
a
. The mask is set to
0xffffffff
for each element where the comparison is true and
0x0
where the comparison is false.
The results of each intrinsic operation are placed in a register. This register is illustrated for each intrinsic with R or R0-R3. R0, R1, R2, and R3 each represent one of the four 32-bit pieces of the result register.
Intrinsic Name
Operation
Corresponding
Intel® SSE Instruction
_mm_cmpeq_ss
Equal
CMPEQSS
_mm_cmpeq_ps
Equal
CMPEQPS
_mm_cmplt_ss
Less Than
CMPLTSS
_mm_cmplt_ps
Less Than
CMP