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 Integer Broadcast 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_broadcast_i32x4, _mm512_mask_broadcast_i32x4, _mm512_maskz_broadcast_i32x4

Broadcasts source int32 element to four destinations.

VBROADCASTI32X4

_mm512_broadcast_i64x4, _mm512_mask_broadcast_i64x4, _mm512_maskz_broadcast_i64x4

Broadcasts source int64 element to four destinations.

VBROADCASTI64X4

_mm512_broadcastd_epi32, _mm512_mask_broadcastd_epi32, _mm512_maskz_broadcastd_epi32

Broadcasts source int32 element to doubleword destinations.

VPBROADCASTD

_mm512_broadcastq_epi64, _mm512_mask_broadcastq_epi64, _mm512_maskz_broadcastq_epi64

Broadcasts source int64 element to quadword destinations.

VPBROADCASTQ

_mm512_broadcastmb_epi64

Broadcasts low byte from input mask to all int64 destination elements.

VPBROADCASTMB2Q

_mm512_broadcastmw_epi32

Broadcasts low word from input mask to all int32 destination elements.

VPBROADCASTMD2W


variable definition
k

writemask used as a selector

a

first source vector element

src

source element to use based on writemask result


_mm512_broadcast_i32x4

extern __m512i __cdecl _mm512_broadcast_i32x4(__m128i a);

Broadcasts four packed int32 elements from a to all destination elements.


_mm512_mask_broadcast_i32x4

extern __m512i __cdecl _mm512_mask_broadcast_i32x4(__m512i src, __mmask16 k, __m128i a);

Broadcasts four packed int32 elements from a to all destination elements using writemask k (elements are copied from src when the corresponding mask bit is not set).


_mm512_maskz_broadcast_i32x4

extern __m512i __cdecl _mm512_maskz_broadcast_i32x4(__mmask16 k, __m128i a);

Broadcasts four packed int32 elements from a to all destination elements using zeromask k (elements are zeroed out when the corresponding mask bit is not set).



_mm512_broadcast_i64x4

extern __m512i __cdecl _mm512_broadcast_i64x4(__m256i a);

Broadcasts four packed int64 elements from a to all destination elements.



_mm512_mask_broadcast_i64x4

extern __m512i __cdecl _mm512_mask_broadcast_i64x4(__m512i src, __mmask8 k, __m256i a);

Broadcasts four packed int64 elements from a to all destination elements using writemask k (elements are copied from src when the corresponding mask bit is not set).



_mm512_maskz_broadcast_i64x4

extern __m512i __cdecl _mm512_maskz_broadcast_i64x4(__mmask8 k, __m256i a);

Broadcasts four packed int64 elements from a to all destination elements using zeromask k (elements are zeroed out when the corresponding mask bit is not set).



_mm512_broadcastd_epi32

extern __m512i __cdecl _mm512_broadcastd_epi32(__m128i a);

Broadcasts low packed 32-bit integer from a to all elements.



_mm512_mask_broadcastd_epi32

extern __m512i __cdecl _mm512_mask_broadcastd_epi32(__m512i src, __mmask16 k, __m128i a);

Broadcasts low packed 32-bit integer from a to all destination elements using writemask k (elements are copied from src when the corresponding mask bit is not set).



_mm512_maskz_broadcastd_epi32

extern __m512i __cdecl _mm512_maskz_broadcastd_epi32(__mmask16 k, __m128i a);

Broadcasts low packed 32-bit integer from a to all destination elements using zeromask k (elements are zeroed out when the corresponding mask bit is not set).



_mm512_broadcastq_epi64

extern __m512i __cdecl _mm512_broadcastq_epi64(__m128i a);

Broadcasts low packed 64-bit integer from a to all destination elements.



_mm512_mask_broadcastq_epi64

extern __m512i __cdecl _mm512_mask_broadcastq_epi64(__m512i src, __mmask8 k, __m128i a);

Broadcasts low packed 64-bit integer from a to all destination elements using writemask k (elements are copied from src when the corresponding mask bit is not set).



_mm512_maskz_broadcastq_epi64

extern __m512i __cdecl _mm512_maskz_broadcastq_epi64(__mmask8 k, __m128i a);

Broadcasts low packed 64-bit integer from a to all destination elements using zeromask k (elements are zeroed out when the corresponding mask bit is not set).



_mm512_broadcastmw_epi32

extern __m512i __cdecl _mm512_broadcastmw_epi32(__mmask16 k);

Broadcasts low 16-bits from input mask k to all 32-bit elements of destination.



_mm512_broadcastmb_epi64

extern __m512i __cdecl _mm512_broadcastmb_epi64(__mmask8 k);

Broadcasts the low 8-bits from input mask k to all 64-bit elements of destination.