Developer Guide and Reference

Contents

Intrinsics for FP Comparison Operations

The prototypes for Intel® Advanced Vector Extensions 512 (Intel® AVX-512) intrinsics are located in the
zmmintrin.h
header file.
To use these intrinsics, include the
immintrin.h
file as follows:
#include <immintrin.h>
Intrinsic Name
Operation
Corresponding
Intel® AVX-512 Instruction
_mm512_cmp_round_pd_mask
,
_mm512_mask_cmp_round_pd_mask
_mm512_cmp_pd_mask
,
_mm512_mask_cmp_pd_mask
,
_mm512_cmp_round_pd_mask
,
_mm512_mask_cmp_round_pd_mask
,
_mm512_cmpeq_pd_mask
,
_mm512_mask_cmpeq_pd_mask
,
_mm512_cmple_pd_mask
,
_mm512_mask_cmple_pd_mask
,
_mm512_cmplt_pd_mask
,
_mm512_mask_cmplt_pd_mask
,
_mm512_cmpneq_pd_mask
,
_mm512_cmplt_pd_mask
,
_mm512_cmpneq_pd_mask
,
_mm512_mask_cmpneq_pd_mask
,
_mm512_cmpnle_pd_mask
,
_mm512_mask_cmpnle_pd_mask
,
_mm512_cmpnlt_pd_mask
,
_mm512_mask_cmpnlt_pd_mask
,
_mm512_cmpord_pd_mask
,
_mm512_mask_cmpord_pd_mask
,
_mm512_cmpunord_pd_mask
,
_mm512_mask_cmpunord_pd_mask
Compares float64 vector elements based on comparison operand.
VCMPPD
_mm512_cmp_round_ps_mask
,
_mm512_mask_cmp_round_ps_mask
_mm512_cmp_ps_mask
,
_mm512_mask_cmp_ps_mask
,
_mm512_cmp_round_ps_mask
,
_mm512_mask_cmp_round_ps_mask
,
_mm512_cmpeq_ps_mask
,
_mm512_mask_cmpeq_ps_mask
,
_mm512_cmple_ps_mask
,
_mm512_mask_cmple_ps_mask
,
_mm512_cmplt_ps_mask
,
_mm512_mask_cmplt_ps_mask
,
_mm512_cmpneq_ps_mask
,
_mm512_mask_cmpneq_ps_mask
,
_mm512_cmpnle_ps_mask
,
_mm512_mask_cmpnle_ps_mask
,
_mm512_cmpnlt_ps_mask
,
_mm512_mask_cmpnlt_ps_mask
,
_mm512_cmpord_ps_mask
,
_mm512_mask_cmpord_ps_mask
,
_mm512_cmpunord_ps_mask
,
_mm512_mask_cmpunord_ps_mask
Compares float32 vector elements based on comparison operand.
VCMPPS
_mm_cmp_sd_mask
,
_mm_mask_cmp_sd_mask
,
_mm_cmp_round_sd_mask
,
_mm_mask_cmp_sd_mask
Compares lower float64 vector elements based on comparison operand.
VCMPSD
_mm_cmp_ss_mask
,
_mm_mask_cmp_ss_mask
,
_mm_cmp_round_ss_mask
,
_mm_mask_cmp_ss_mask
Compares lower float32 vector elements based on comparison operand.
VCMPSS
variable
definition
k
writemask used as a selector
a
first source vector element
b
second source vector element
src
source element to use based on writemask result
round
Rounding control values; these can be one of the following (along with the
sae
suppress all exceptions flag):
  • _MM_FROUND_TO_NEAREST_INT
    - rounds to nearest even
  • _MM_FROUND_TO_NEG_INF
    - rounds to negative infinity
  • _MM_FROUND_TO_POS_INF
    - rounds to positive infinity
  • _MM_FROUND_TO_ZERO
    - rounds to zero
  • _MM_FROUND_CUR_DIRECTION
    - rounds using default from MXCSR register
imm
comparison predicate, which can be any of the following values:
  • _MM_CMPINT_EQ
    - Equal
  • _MM_CMPINT_LT
    - Less than
  • _MM_CMPINT_LE
    - Less than or Equal
  • _MM_CMPINT_NE
    - Not Equal
  • _MM_CMPINT_NLT
    - Not Less than
  • _MM_CMPINT_GE
    - Greater than or Equal
  • _MM_CMPINT_NLE
    - Not Less than or Equal
  • _MM_CMPINT_GT
    - Greater than
_mm512_cmp_pd_mask
extern __mmask8 __cdecl _mm512_cmp_pd_mask(__m512d a, __m512d b, const int imm);
Compares float64 elements in
a
and
b
based on the comparison operand specified by
imm
.
The result is stored in mask vector.
_mm512_cmp_round_pd_mask
extern __mmask8 __cdecl _mm512_cmp_round_pd_mask(__m512d a, __m512d b, const int imm, const int round);
Compares float64 elements in
a
and
b
based on the comparison operand specified by
imm
.
The result is stored in mask vector.
Pass
__MM_FROUND_NO_EXC
to
round
to suppress all exceptions.
_mm512_mask_cmp_round_pd_mask
extern __mmask8 __cdecl _mm512_mask_cmp_round_pd_mask(__mmask8 k, __m512d a, __m512d b, const int imm, const int round);
Compares float64 elements in
a
and
b
based on the comparison operand specified by
imm
.
The result is stored in mask vector using zeromask
k
(elements are zeroed out when the corresponding mask bit is not set).
Pass
__MM_FROUND_NO_EXC
to
round
to suppress all exceptions.
_mm512_mask_cmp_pd_mask
<