10 #error "Never use <avx512vlbf16intrin.h> directly; include <immintrin.h> instead."
13 #ifndef __AVX512VLBF16INTRIN_H
14 #define __AVX512VLBF16INTRIN_H
16 typedef short __m128bh
__attribute__((__vector_size__(16), __aligned__(16)));
18 #define __DEFAULT_FN_ATTRS128 \
19 __attribute__((__always_inline__, __nodebug__, \
20 __target__("avx512vl, avx512bf16"), __min_vector_width__(128)))
21 #define __DEFAULT_FN_ATTRS256 \
22 __attribute__((__always_inline__, __nodebug__, \
23 __target__("avx512vl, avx512bf16"), __min_vector_width__(256)))
39 return (__m128bh)__builtin_ia32_cvtne2ps2bf16_128((__v4sf) __A,
62 return (__m128bh)__builtin_ia32_selectw_128((
__mmask8)__U,
84 return (__m128bh)__builtin_ia32_selectw_128((
__mmask8)__U,
103 return (__m256bh)__builtin_ia32_cvtne2ps2bf16_256((__v8sf) __A,
126 return (__m256bh)__builtin_ia32_selectw_256((
__mmask16)__U,
148 return (__m256bh)__builtin_ia32_selectw_256((
__mmask16)__U,
165 return (__m128bh)__builtin_ia32_cvtneps2bf16_128_mask((__v4sf) __A,
187 return (__m128bh)__builtin_ia32_cvtneps2bf16_128_mask((__v4sf) __A,
207 return (__m128bh)__builtin_ia32_cvtneps2bf16_128_mask((__v4sf) __A,
223 return (__m128bh)__builtin_ia32_cvtneps2bf16_256_mask((__v8sf)__A,
244 return (__m128bh)__builtin_ia32_cvtneps2bf16_256_mask((__v8sf)__A,
263 return (__m128bh)__builtin_ia32_cvtneps2bf16_256_mask((__v8sf)__A,
284 return (__m128)__builtin_ia32_dpbf16ps_128((__v4sf)
__D,
308 return (__m128)__builtin_ia32_selectps_128((
__mmask8)__U,
332 return (__m128)__builtin_ia32_selectps_128((
__mmask8)__U,
353 return (__m256)__builtin_ia32_dpbf16ps_256((__v8sf)
__D,
377 return (__m256)__builtin_ia32_selectps_256((
__mmask8)__U,
401 return (__m256)__builtin_ia32_selectps_256((
__mmask8)__U,
417 __v4sf __V = {__A, 0, 0, 0};
418 __v8hi __R = __builtin_ia32_cvtneps2bf16_128_mask(
471 #undef __DEFAULT_FN_ATTRS128
472 #undef __DEFAULT_FN_ATTRS256
static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_cvtepi16_epi32(__m128i __V)
static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_slli_epi32(__m256i __a, int __count)
unsigned short __bfloat16
static __inline__ __m128bh __DEFAULT_FN_ATTRS256 _mm256_maskz_cvtneps_pbh(__mmask8 __U, __m256 __A)
Convert Packed Single Data to Packed BF16 Data.
static __inline__ __m128bh __DEFAULT_FN_ATTRS128 _mm_maskz_cvtne2ps_pbh(__mmask8 __U, __m128 __A, __m128 __B)
Convert Two Packed Single Data to One Packed BF16 Data.
static __inline__ __m128 __DEFAULT_FN_ATTRS128 _mm_mask_dpbf16_ps(__m128 __D, __mmask8 __U, __m128bh __A, __m128bh __B)
Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
static __inline__ __m256 __DEFAULT_FN_ATTRS256 _mm256_mask_dpbf16_ps(__m256 __D, __mmask8 __U, __m256bh __A, __m256bh __B)
Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
static __inline__ __m128bh __DEFAULT_FN_ATTRS256 _mm256_mask_cvtneps_pbh(__m128bh __W, __mmask8 __U, __m256 __A)
Convert Packed Single Data to Packed BF16 Data.
static __inline__ __m128bh __DEFAULT_FN_ATTRS128 _mm_mask_cvtneps_pbh(__m128bh __W, __mmask8 __U, __m128 __A)
Convert Packed Single Data to Packed BF16 Data.
static __inline__ __m128bh __DEFAULT_FN_ATTRS128 _mm_mask_cvtne2ps_pbh(__m128bh __W, __mmask8 __U, __m128 __A, __m128 __B)
Convert Two Packed Single Data to One Packed BF16 Data.
static __inline__ __m256bh __DEFAULT_FN_ATTRS256 _mm256_mask_cvtne2ps_pbh(__m256bh __W, __mmask16 __U, __m256 __A, __m256 __B)
Convert Two Packed Single Data to One Packed BF16 Data.
static __inline__ __m128bh __DEFAULT_FN_ATTRS256 _mm256_cvtneps_pbh(__m256 __A)
Convert Packed Single Data to Packed BF16 Data.
static __inline__ __m256bh __DEFAULT_FN_ATTRS256 _mm256_maskz_cvtne2ps_pbh(__mmask16 __U, __m256 __A, __m256 __B)
Convert Two Packed Single Data to One Packed BF16 Data.
static __inline__ __m128bh __DEFAULT_FN_ATTRS128 _mm_maskz_cvtneps_pbh(__mmask8 __U, __m128 __A)
Convert Packed Single Data to Packed BF16 Data.
static __inline__ __m256 __DEFAULT_FN_ATTRS256 _mm256_cvtpbh_ps(__m128bh __A)
Convert Packed BF16 Data to Packed float Data.
static __inline__ __m128 __DEFAULT_FN_ATTRS128 _mm_dpbf16_ps(__m128 __D, __m128bh __A, __m128bh __B)
Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
static __inline__ __m128bh __DEFAULT_FN_ATTRS128 _mm_cvtne2ps_pbh(__m128 __A, __m128 __B)
Convert Two Packed Single Data to One Packed BF16 Data.
static __inline__ __m256 __DEFAULT_FN_ATTRS256 _mm256_mask_cvtpbh_ps(__m256 __S, __mmask8 __U, __m128bh __A)
Convert Packed BF16 Data to Packed float Data using merging mask.
static __inline__ __m256 __DEFAULT_FN_ATTRS256 _mm256_maskz_cvtpbh_ps(__mmask8 __U, __m128bh __A)
Convert Packed BF16 Data to Packed float Data using zeroing mask.
#define __DEFAULT_FN_ATTRS256
#define __DEFAULT_FN_ATTRS128
static __inline__ __m256 __DEFAULT_FN_ATTRS256 _mm256_maskz_dpbf16_ps(__mmask8 __U, __m256 __D, __m256bh __A, __m256bh __B)
Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
static __inline__ __m128 __DEFAULT_FN_ATTRS128 _mm_maskz_dpbf16_ps(__mmask8 __U, __m128 __D, __m128bh __A, __m128bh __B)
Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
short __m128bh __attribute__((__vector_size__(16), __aligned__(16)))
static __inline__ __m128bh __DEFAULT_FN_ATTRS128 _mm_cvtneps_pbh(__m128 __A)
Convert Packed Single Data to Packed BF16 Data.
static __inline__ __m256bh __DEFAULT_FN_ATTRS256 _mm256_cvtne2ps_pbh(__m256 __A, __m256 __B)
Convert Two Packed Single Data to One Packed BF16 Data.
static __inline__ __bfloat16 __DEFAULT_FN_ATTRS128 _mm_cvtness_sbh(float __A)
Convert One Single float Data to One BF16 Data.
static __inline__ __m256 __DEFAULT_FN_ATTRS256 _mm256_dpbf16_ps(__m256 __D, __m256bh __A, __m256bh __B)
Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_mask_slli_epi32(__m256i __W, __mmask8 __U, __m256i __A, unsigned int __B)
static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_maskz_cvtepi16_epi32(__mmask8 __U, __m128i __A)
static __inline __m256 __DEFAULT_FN_ATTRS _mm256_castsi256_ps(__m256i __a)
Casts a 256-bit integer vector into a 256-bit floating-point vector of [8 x float].
static __inline __m256i __DEFAULT_FN_ATTRS _mm256_setzero_si256(void)
Constructs a 256-bit integer vector initialized to zero.
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_undefined_si128(void)
Generates a 128-bit vector of [4 x i32] with unspecified content.
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_setzero_si128(void)
Creates a 128-bit integer vector initialized to zero.
static __inline__ unsigned int unsigned char __D