Developer Guide and Reference

Contents

Intrinsics for Intel® Advanced Vector Extensions 512 (Intel® AVX-512) VPOPCNTDQ Instructions

The prototypes for Intel® Advanced Vector Extensions 512 (Intel® AVX-512) VPOPCNTDQ instruction intrinsics are located in the zmmintrin.h header file.
To use these intrinsics, include the
immintrin.h
file as follows:
#include <immintrin.h>
_mm512_popcnt_epi32
__mm512i _mm512_popcnt_epi32 (__m512i a)
variable
definition
a
a source vector
Instructions: vpopcntd zmm1, zmm2
Counts the number of bits set to one in each dword element of
a
and places it in the corresponding elements of the result.
_mm512_mask_popcnt_epi32
__mm512i _mm512_mask_popcnt_epi32 (__m512 b, __mmask16 k, __m512i a)
variable
definition
a
a source vector
b
a second source vector
k
mask used as a selector
Instructions: vpopcntd zmm1 {k}, zmm2
Counts the number of bits set to one in each dword element of
a
using mask
k
and places it in the corresponding elements of the result. Elements are copied from
b
when the corresponding mask bit is not set.
_mm512_maskz_popcnt_epi32
__mm512i _mm512_maskz_popcnt_epi32 (__mmask16 k, __m512i a)
variable
definition
a
a source vector
k
mask used as a selector
Instructions: vpopcntd zmm1 {k}, zmm2
Counts the number of bits set to one in each dword element of
a
using mask
k
and places it in the corresponding elements of the result. Elements are zeroed out when the corresponding mask bit is not set.
_mm512_popcnt_epi64
__mm512i _mm512_popcnt_epi64 (__m512i a)
variable
definition
a
a source vector
Instructions: vpopcntd zmm1, zmm2
Counts the number of bits set to one in each quad word element of
a
and places it in the corresponding elements of the result.
_mm512_mask_popcnt_epi64
__mm512i _mm512_mask_popcnt_epi64 (__m512 b, __mmask16 k, __m512i a)
variable
definition
a
a source vector
b
a second source vector
k
mask used as a selector
Instructions: vpopcntd zmm1 {k}, zmm2
Counts the number of bits set to one in each quad word element of
a
using mask
k
and places it in the corresponding elements of the result. Elements are copied from
b
when the corresponding mask bit is not set.
_mm512_maskz_popcnt_epi64
__mm512i _mm512_maskz_popcnt_epi64 (__m512 b, __mmask16 k, __m512 a)
variable
definition
a
a source vector
b
a second source vector
k
mask used as a selector
Instructions: vpopcntd zmm2 {k}, zmm2
Counts the number of bits set to one in each quad word element of
a
using mask
k
and places it in the corresponding elements of the result. Elements are zeroed out when the corresponding mask bit is not set.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.