Intel® C++ Compiler 16.0 User and Reference Guide

_mm512_cmp_pd_mask/ _mm512_mask_cmp_pd_mask

Performs a comparison between float64 vectors. Corresponding instruction is VCMPPD. This intrinsic only applies to Intel® Many Integrated Core Architecture (Intel® MIC Architecture).

Syntax

Without Mask

extern __mmask8 __cdecl _mm512_cmp_pd_mask(__m512d v2, __m512d v3, const int op);

With Mask

extern __mmask8 __cdecl _mm512_mask_cmp_pd_mask(__mmask8 k1, __m512d v2, __m512d v3, const int op);

Parameters

v2

float64 vector used for the compare operation

v3

float64 vector used for the compare operation

k1

Writemask; only those elements of the source vectors with corresponding bit set to '1' in the k1 mask are computed and stored in the result

op

Comparison predicate. Takes one 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

Description

This intrinsic performs an element-by-element comparison between float64 vectors v2 and v3, using the op parameter as a comparison predicate.

For the sake of convenience, the compiler provides the following intrinsics that correspond to the values of the op parameter. You can use these intrinsic names instead of specifying the op parameter.

Intrinsic Name

Corresponding Comparison Predicate

_mm512_cmpeq_pd_mask(v2, v3)

_CMP_EQ_OQ

_mm512_mask_cmpeq_pd_mask(k1, v2, v3)

_CMP_EQ_OQ

_mm512_cmplt_pd_mask(v2, v3)

_CMP_LT_OS

_mm512_mask_cmplt_pd_mask(k1, v2, v3)

_CMP_LT_OS

_mm512_cmple_pd_mask(v2, v3)

_CMP_LE_OS

_mm512_mask_cmple_pd_mask(k1, v2, v3)

_CMP_LE_OS

_mm512_cmpunord_pd_mask(v2, v3)

_CMP_UNORD_Q

_mm512_mask_cmpunord_pd_mask(k1, v2, v3)

_CMP_UNORD_Q

_mm512_cmpneq_pd_mask(v2, v3)

_CMP_NEQ_UQ

_mm512_mask_cmpneq_pd_mask(k1, v2, v3)

_CMP_NEQ_UQ

_mm512_cmpnlt_pd_mask(v2, v3)

_CMP_NLT_US

_mm512_mask_cmpnlt_pd_mask(k1, v2, v3)

_CMP_NLT_US

_mm512_cmpnle_pd_mask(v2, v3)

_CMP_NLE_US

_mm512_mask_cmpnle_pd_mask(k1, v2, v3)

_CMP_NLE_US

_mm512_cmpord_pd_mask(v2, v3)

_CMP_ORD_Q

_mm512_mask_cmpord_pd_mask(k1, v2, v3)

_CMP_ORD_Q

Returns

Returns the result of the comparison in bit eight of the return value, where there is one bit per pair of elements. The ith bit is set to one if and only if (v2[i] op v3[i]) is true.

In the masked variant, for those elements with a corresponding mask bit set to zero, the return value in the corresponding bit of the result mask is zero.