Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Intrinsics for FP Addition 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_add_round_pd, _mm512_mask_add_round_pd, _mm512_maskz_add_round_pd

Add rounded float64 vectors.

VADDPD

_mm512_add_pd, _mm512_mask_add_pd, _mm512_maskz_add_pd

Add rounded float64 vectors.

VADDPD

_mm512_add_round_ps, _mm512_mask_add_round_ps, _mm512_maskz_add_round_ps

Add rounded float32 vectors.

VADDPS

_mm512_add_ps, _mm512_mask_add_ps, _mm512_maskz_add_ps

Add rounded float32 vectors.

VADDPS

_mm_add_round_sd, _mm_mask_add_round_sd, _mm_maskz_add_round_sd

Add scalar float64 vectors.

VADDSD

_mm_mask_add_sd, _mm_maskz_add_sd

Add scalar float64 vectors.

VADDSD

_mm_add_round_ss, _mm_mask_add_round_ss, _mm_maskz_add_round_ss

Add scalar float32 vectors.

VADDSS

_mm_mask_add_ss, _mm_maskz_add_ss

Add scalar float32 vectors.

VADDPD


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


_mm512_add_pd

extern __m512d __cdecl _mm512_add_pd(__m512d a, __m512d b);

Adds packed float64 elements in a and b, and stores the result.



_mm512_mask_add_pd

extern __m512d __cdecl _mm512_mask_add_pd(__m512d src, __mmask8 k, __m512d a, __m512d b);

Adds packed float64 elements in a and b, and stores the result using writemask k (elements are copied from src when the corresponding mask bit is not set).



_mm512_maskz_add_pd

extern __m512d __cdecl _mm512_maskz_add_pd(__mmask8 k, __m512d a, __m512d b);

Adds packed float64 elements in a and b, and stores the result using zeromask k (elements are zeroed out when the corresponding mask bit is not set).



_mm512_add_round_pd

extern __m512d __cdecl _mm512_add_round_pd(__m512d a, __m512d b, int round);

Adds packed float64 elements in a and b using rounding control round, and stores the result.



_mm512_mask_add_round_pd

extern __m512d __cdecl _mm512_mask_add_round_pd(__m512d src, __mmask8 k, __m512d a, __m512d b, int round);

Adds packed float64 elements in a and b using rounding control round, and stores the result using writemask k (elements are copied from src when the corresponding mask bit is not set).



_mm512_maskz_add_round_pd

extern __m512d __cdecl _mm512_maskz_add_round_pd(__mmask8 k, __m512d a, __m512d b, int round);

Adds packed float64 elements in a and b using rounding control round, and stores the result using zeromask k (elements are zeroed out when the corresponding mask bit is not set).



_mm512_add_ps

extern __m512 __cdecl _mm512_add_ps(__m512 a, __m512 b);

Adds packed float32 elements in a and b, and stores the result.



_mm512_mask_add_ps

extern __m512 __cdecl _mm512_mask_add_ps(__m512 src, __mmask16 k, __m512 a, __m512 b);

Adds packed float32 elements in a and b, and stores the result using writemask k (elements are copied from src when the corresponding mask bit is not set).



_mm512_maskz_add_ps

extern __m512 __cdecl _mm512_maskz_add_ps(__mmask16 k, __m512 a, __m512 b);

Adds packed float32 elements in a and b, and stores the result using zeromask k (elements are zeroed out when the corresponding mask bit is not set).



_mm512_add_round_ps

extern __m512 __cdecl _mm512_add_round_ps(__m512 a, __m512 b, int round);

Adds packed float32 elements in a and b using rounding control round, and stores the result.



_mm512_mask_add_round_ps

extern __m512 __cdecl _mm512_mask_add_round_ps(__m512 src, __mmask16 k, __m512 a, __m512 b, int round);

Adds packed float32 elements in a and b using rounding control round, and stores the result using writemask k (elements are copied from src when the corresponding mask bit is not set).



_mm512_maskz_add_round_ps

extern __m512 __cdecl _mm512_maskz_add_round_ps(__mmask16 k, __m512 a, __m512 b, int round);

Adds packed float32 elements in a and b using rounding control round, and stores the result using zeromask k (elements are zeroed out when the corresponding mask bit is not set).



_mm_add_round_sd

extern __m128d __cdecl _mm_add_round_sd(__m128d a, __m128d b, int round);

Adds the lower float64 element in a and b using rounding control round, stores the result in the lower destination element, and copies the upper element from a to the upper destination element.



_mm_mask_add_round_sd

extern __m128d __cdecl _mm_mask_add_round_sd(__m128d src, __mmask8 k, __m128d a, __m128d b, int round);

Adds the lower float64 element in a and b using rounding control round, stores the result in the lower destination element using writemask k (the element is copied from src when mask bit 0 is not set), and copies the upper element from a to the upper destination element.



_mm_maskz_add_round_sd

extern __m128d __cdecl _mm_maskz_add_round_sd(__mmask8 k, __m128d a, __m128d b, int round);

Adds the lower float64 element in a and b using rounding control round, stores the result in the lower destination element using zeromask k (the element is zeroed out when mask bit 0 is not set), and copies the upper element from a to the upper destination element.



_mm_mask_add_sd

extern __m128d __cdecl _mm_mask_add_sd(__m128d src, __mmask8 k, __m128d a, __m128d b);

Adds the lower float64 element in a and b, stores the result in the lower destination element using writemask k (the element is copied from src when mask bit 0 is not set), and copies the upper element from a to the upper destination element.



_mm_maskz_add_sd

extern __m128d __cdecl _mm_maskz_add_sd(__mmask8 k, __m128d a, __m128d b);

Adds the lower float64 element in a and b, stores the result in the lower destination element using zeromask k (the element is zeroed out when mask bit 0 is not set), and copies the upper element from a to the upper destination element.



_mm_add_round_ss

extern __m128 __cdecl _mm_add_round_ss(__m128 a, __m128 b, int round);

Add the lower float32 element in a and b using rounding control round, stores the result in the lower destination element, and copies the upper three packed elements from a to the upper destination elements.



_mm_mask_add_round_ss

extern __m128 __cdecl _mm_mask_add_round_ss(__m128 src, __mmask8 k, __m128 a, __m128 b, int round);

Add the lower float32 element in a and b using rounding control round, stores the result in the lower destination element using writemask k (the element is copied from src when mask bit 0 is not set), and copies the upper three packed elements from a to the upper destination elements.



_mm_maskz_add_round_ss

extern __m128 __cdecl _mm_maskz_add_round_ss(__mmask8 k, __m128 a, __m128 b, int round);

Add the lower float32 element in a and b using rounding control round, stores the result in the lower destination element using zeromask k (the element is zeroed out when mask bit 0 is not set), and copies the upper three packed elements from a to the upper destination elements.



_mm_mask_add_ss

extern __m128 __cdecl _mm_mask_add_ss(__m128 src, __mmask8 k, __m128 a, __m128 b);

Add the lower float32 element in a and b, stores the result in the lower destination element using writemask k (the element is copied from src when mask bit 0 is not set), and copies the upper three packed elements from a to the upper destination elements.



_mm_maskz_add_ss

extern __m128 __cdecl _mm_maskz_add_ss(__mmask8 k, __m128 a, __m128 b);

Add the lower float32 element in a and b, stores the result in the lower destination element using zeromask k (the element is zeroed out when mask bit 0 is not set), and copies the upper three packed elements from a to the upper destination elements.