Intel® C++ Compiler 16.0 User and Reference Guide

_mm512_fmadd_epi32/ _mm512_mask_fmadd_epi32/ _mm512_mask3_fmadd_epi32

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

Syntax

Without Mask

extern __m512i __cdecl _mm512_fmadd_epi32(_m512i v1, __m512i v2, __m512i v3);

With Mask

extern __m512i __cdecl _mm512_mask_fmadd_epi32(_m512i v1, __mmask16 k1, __m512i v2, __m512i v3);

extern __m512i __cdecl _mm512_mask3_fmadd_epi32(_m512i v1, __m512i v2, __m512i v3, __mmask16 k1);

Parameters

v1

int32 vector used for multiplying by int32 vector v2.

Notice that the syntax is v1, not v1_old.

v2

int32 vector multiplied by int32 vector v1.

v3

int32 vector added to 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; elements in the result vector corresponding to zero bit in k1 are copied from corresponding elements of vector v1_old

Description

Performs an element-by-element multiplication between int32 vector v1 and the int32 vector v2, then adds the result to int32 vector v3.

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_fmadd_epi32(v1, k1, v2, v3) the pass-through values come from v1, while for _mm512_mask3_fmadd_epi32(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.