Intel® C++ Compiler 16.0 User and Reference Guide

_mm512_fnmadd_pd/ _mm512_fnmadd_round_pd/ _mm512_mask_fnmadd_pd/ _mm512_mask3_fnmadd_pd/ _mm512_mask_fnmadd_round_pd/ _mm512_mask3_fnmadd_round_pd

Multiply, add, and negate float64 vectors. This intrinsic only applies to Intel® Many Integrated Core Architecture (Intel® MIC Architecture).

Syntax

Without Mask

extern __m512d __cdecl _mm512_fnmadd_pd(__m512d v1, __m512d v2, __m512d v3);

extern __m512d __cdecl _mm512_fnmadd_round_pd(__m512d v1, __m512d v2, __m512d v3, int rc);

With Mask

extern __m512d __cdecl _mm512_mask_fnmadd_pd(__m512d v1, __mmask8 k1, __m512d v2, __m512d v3);

extern __m512d __cdecl _mm512_mask_fnmadd_round_pd(__m512d v1, __mmask8 k1, __m512d v2, __m512d v3, int rc);

extern __m512d __cdecl _mm512_mask3_fnmadd_pd(__m512d v1, __m512d v2, __m512d v3, __mmask8 k1);

extern __m512d __cdecl _mm512_mask3_fnmadd_round_pd(__m512d v1, __m512d v2, __m512d v3, __mmask8 k1, int rc);

Parameters

v1

float64 vector used for multiplying by float64 vector v2.

Notice that the syntax is v1, not v1_old.

v2

float64 vector multiplied by float64 vector v1.

v3

float64 vector from which to subtract the product of v1 and v2.

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

rc

Rounding control values; these can be one of the following:

  • _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

Description

Performs an element-by-element multiplication between float64 vector v1 and the float64 vector v2, then subtracts the result from float64 vector v3. Intermediate values are calculated to infinite precision, and are not truncated or rounded, unless you specify the rounding parameter.

The masked variant has one additional argument: k1. Only those elements in source registers with the corresponding bit set in vector mask k1 are used for computing. When a write mask is used, the pass-through values come from the vector parameter immediately preceding the mask parameter. For example, for _mm512_mask_fnmadd_pd(v1, k1, v2, v3) the pass-through values come from v1, while for _mm512_mask3_fnmadd_pd(v1, v2, v3, k3) the pass-through values come from v3. To get the pass-through values from v2, reverse the order of v1 and v2 in the _mask_ form.

Returns

Returns the result of the multiplication-addition operation.