Developer Guide and Reference

Contents

Compare Intrinsics

Intel® Streaming SIMD Extensions 2 (Intel® SSE2) intrinsics for floating-point comparision operations are listed in the following table. The prototypes for Intel® SSE2 intrinsics are in the
emmintrin.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 two double-precision FP values of
a
and
b
are compared, and a 128-bit mask is returned. For the scalar form, the lower double-precision FP values of
a
and
b
are compared, and a 64-bit mask is returned; the upper double-precision FP value is passed through from
a
.
The mask is set to
0xffffffffffffffff
for each element where the comparison is true, and set to
0x0
where the comparison is false. The
r
following the instruction name indicates that the operands to the instruction are reversed in the actual implementation.
The results of each intrinsic operation are placed in a register. The information about what is placed in each register appears in the tables below, in the detailed explanation for each intrinsic. For each intrinsic, the resulting register is represented by
R
,
R0
, and
R1
, where
R
,
R0
, and
R1
each represent one piece of the result register.
Intrinsic Name
Operation
Corresponding
Intel® SSE2 Instruction
_mm_cmpeq_pd
Equality
CMPEQPD
_mm_cmplt_pd
Less Than
CMPLTPD