@cpp-linter/clang-tidy-win32-x64 12.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/LICENSE.TXT +279 -0
  2. package/README.md +7 -0
  3. package/bin/clang-tidy.exe +4 -0
  4. package/lib/clang/12.0.1/include/__clang_cuda_builtin_vars.h +121 -0
  5. package/lib/clang/12.0.1/include/__clang_cuda_cmath.h +512 -0
  6. package/lib/clang/12.0.1/include/__clang_cuda_complex_builtins.h +285 -0
  7. package/lib/clang/12.0.1/include/__clang_cuda_device_functions.h +1486 -0
  8. package/lib/clang/12.0.1/include/__clang_cuda_intrinsics.h +486 -0
  9. package/lib/clang/12.0.1/include/__clang_cuda_libdevice_declares.h +462 -0
  10. package/lib/clang/12.0.1/include/__clang_cuda_math.h +348 -0
  11. package/lib/clang/12.0.1/include/__clang_cuda_math_forward_declares.h +284 -0
  12. package/lib/clang/12.0.1/include/__clang_cuda_runtime_wrapper.h +443 -0
  13. package/lib/clang/12.0.1/include/__clang_hip_cmath.h +664 -0
  14. package/lib/clang/12.0.1/include/__clang_hip_libdevice_declares.h +334 -0
  15. package/lib/clang/12.0.1/include/__clang_hip_math.h +1275 -0
  16. package/lib/clang/12.0.1/include/__clang_hip_runtime_wrapper.h +69 -0
  17. package/lib/clang/12.0.1/include/__stddef_max_align_t.h +27 -0
  18. package/lib/clang/12.0.1/include/__wmmintrin_aes.h +140 -0
  19. package/lib/clang/12.0.1/include/__wmmintrin_pclmul.h +48 -0
  20. package/lib/clang/12.0.1/include/adxintrin.h +72 -0
  21. package/lib/clang/12.0.1/include/altivec.h +18239 -0
  22. package/lib/clang/12.0.1/include/ammintrin.h +179 -0
  23. package/lib/clang/12.0.1/include/amxintrin.h +278 -0
  24. package/lib/clang/12.0.1/include/arm64intr.h +35 -0
  25. package/lib/clang/12.0.1/include/arm_acle.h +716 -0
  26. package/lib/clang/12.0.1/include/arm_bf16.h +20 -0
  27. package/lib/clang/12.0.1/include/arm_cde.h +410 -0
  28. package/lib/clang/12.0.1/include/arm_cmse.h +217 -0
  29. package/lib/clang/12.0.1/include/arm_fp16.h +596 -0
  30. package/lib/clang/12.0.1/include/arm_mve.h +19187 -0
  31. package/lib/clang/12.0.1/include/arm_neon.h +68982 -0
  32. package/lib/clang/12.0.1/include/arm_sve.h +18148 -0
  33. package/lib/clang/12.0.1/include/armintr.h +31 -0
  34. package/lib/clang/12.0.1/include/avx2intrin.h +1148 -0
  35. package/lib/clang/12.0.1/include/avx512bf16intrin.h +279 -0
  36. package/lib/clang/12.0.1/include/avx512bitalgintrin.h +83 -0
  37. package/lib/clang/12.0.1/include/avx512bwintrin.h +2024 -0
  38. package/lib/clang/12.0.1/include/avx512cdintrin.h +123 -0
  39. package/lib/clang/12.0.1/include/avx512dqintrin.h +1377 -0
  40. package/lib/clang/12.0.1/include/avx512erintrin.h +271 -0
  41. package/lib/clang/12.0.1/include/avx512fintrin.h +9618 -0
  42. package/lib/clang/12.0.1/include/avx512ifmaintrin.h +68 -0
  43. package/lib/clang/12.0.1/include/avx512ifmavlintrin.h +119 -0
  44. package/lib/clang/12.0.1/include/avx512pfintrin.h +97 -0
  45. package/lib/clang/12.0.1/include/avx512vbmi2intrin.h +357 -0
  46. package/lib/clang/12.0.1/include/avx512vbmiintrin.h +105 -0
  47. package/lib/clang/12.0.1/include/avx512vbmivlintrin.h +188 -0
  48. package/lib/clang/12.0.1/include/avx512vlbf16intrin.h +474 -0
  49. package/lib/clang/12.0.1/include/avx512vlbitalgintrin.h +145 -0
  50. package/lib/clang/12.0.1/include/avx512vlbwintrin.h +2809 -0
  51. package/lib/clang/12.0.1/include/avx512vlcdintrin.h +225 -0
  52. package/lib/clang/12.0.1/include/avx512vldqintrin.h +1167 -0
  53. package/lib/clang/12.0.1/include/avx512vlintrin.h +8445 -0
  54. package/lib/clang/12.0.1/include/avx512vlvbmi2intrin.h +689 -0
  55. package/lib/clang/12.0.1/include/avx512vlvnniintrin.h +304 -0
  56. package/lib/clang/12.0.1/include/avx512vlvp2intersectintrin.h +121 -0
  57. package/lib/clang/12.0.1/include/avx512vnniintrin.h +115 -0
  58. package/lib/clang/12.0.1/include/avx512vp2intersectintrin.h +77 -0
  59. package/lib/clang/12.0.1/include/avx512vpopcntdqintrin.h +54 -0
  60. package/lib/clang/12.0.1/include/avx512vpopcntdqvlintrin.h +91 -0
  61. package/lib/clang/12.0.1/include/avxintrin.h +5053 -0
  62. package/lib/clang/12.0.1/include/avxvnniintrin.h +225 -0
  63. package/lib/clang/12.0.1/include/bmi2intrin.h +81 -0
  64. package/lib/clang/12.0.1/include/bmiintrin.h +427 -0
  65. package/lib/clang/12.0.1/include/cet.h +66 -0
  66. package/lib/clang/12.0.1/include/cetintrin.h +99 -0
  67. package/lib/clang/12.0.1/include/cldemoteintrin.h +36 -0
  68. package/lib/clang/12.0.1/include/clflushoptintrin.h +27 -0
  69. package/lib/clang/12.0.1/include/clwbintrin.h +38 -0
  70. package/lib/clang/12.0.1/include/clzerointrin.h +36 -0
  71. package/lib/clang/12.0.1/include/cpuid.h +319 -0
  72. package/lib/clang/12.0.1/include/cuda_wrappers/algorithm +116 -0
  73. package/lib/clang/12.0.1/include/cuda_wrappers/complex +82 -0
  74. package/lib/clang/12.0.1/include/cuda_wrappers/new +106 -0
  75. package/lib/clang/12.0.1/include/emmintrin.h +4981 -0
  76. package/lib/clang/12.0.1/include/enqcmdintrin.h +63 -0
  77. package/lib/clang/12.0.1/include/f16cintrin.h +162 -0
  78. package/lib/clang/12.0.1/include/float.h +152 -0
  79. package/lib/clang/12.0.1/include/fma4intrin.h +218 -0
  80. package/lib/clang/12.0.1/include/fmaintrin.h +216 -0
  81. package/lib/clang/12.0.1/include/fxsrintrin.h +91 -0
  82. package/lib/clang/12.0.1/include/gfniintrin.h +193 -0
  83. package/lib/clang/12.0.1/include/hresetintrin.h +49 -0
  84. package/lib/clang/12.0.1/include/htmintrin.h +212 -0
  85. package/lib/clang/12.0.1/include/htmxlintrin.h +345 -0
  86. package/lib/clang/12.0.1/include/ia32intrin.h +441 -0
  87. package/lib/clang/12.0.1/include/immintrin.h +600 -0
  88. package/lib/clang/12.0.1/include/intrin.h +585 -0
  89. package/lib/clang/12.0.1/include/inttypes.h +97 -0
  90. package/lib/clang/12.0.1/include/invpcidintrin.h +23 -0
  91. package/lib/clang/12.0.1/include/iso646.h +27 -0
  92. package/lib/clang/12.0.1/include/keylockerintrin.h +506 -0
  93. package/lib/clang/12.0.1/include/limits.h +102 -0
  94. package/lib/clang/12.0.1/include/lwpintrin.h +136 -0
  95. package/lib/clang/12.0.1/include/lzcntintrin.h +104 -0
  96. package/lib/clang/12.0.1/include/mm3dnow.h +157 -0
  97. package/lib/clang/12.0.1/include/mm_malloc.h +67 -0
  98. package/lib/clang/12.0.1/include/mmintrin.h +1558 -0
  99. package/lib/clang/12.0.1/include/module.modulemap +164 -0
  100. package/lib/clang/12.0.1/include/movdirintrin.h +49 -0
  101. package/lib/clang/12.0.1/include/msa.h +573 -0
  102. package/lib/clang/12.0.1/include/mwaitxintrin.h +33 -0
  103. package/lib/clang/12.0.1/include/nmmintrin.h +16 -0
  104. package/lib/clang/12.0.1/include/opencl-c-base.h +589 -0
  105. package/lib/clang/12.0.1/include/opencl-c.h +17162 -0
  106. package/lib/clang/12.0.1/include/openmp_wrappers/__clang_openmp_device_functions.h +42 -0
  107. package/lib/clang/12.0.1/include/openmp_wrappers/cmath +78 -0
  108. package/lib/clang/12.0.1/include/openmp_wrappers/complex +52 -0
  109. package/lib/clang/12.0.1/include/openmp_wrappers/complex.h +27 -0
  110. package/lib/clang/12.0.1/include/openmp_wrappers/complex_cmath.h +388 -0
  111. package/lib/clang/12.0.1/include/openmp_wrappers/math.h +51 -0
  112. package/lib/clang/12.0.1/include/openmp_wrappers/new +70 -0
  113. package/lib/clang/12.0.1/include/pconfigintrin.h +40 -0
  114. package/lib/clang/12.0.1/include/pkuintrin.h +34 -0
  115. package/lib/clang/12.0.1/include/pmmintrin.h +290 -0
  116. package/lib/clang/12.0.1/include/popcntintrin.h +59 -0
  117. package/lib/clang/12.0.1/include/ppc_wrappers/emmintrin.h +2324 -0
  118. package/lib/clang/12.0.1/include/ppc_wrappers/mm_malloc.h +50 -0
  119. package/lib/clang/12.0.1/include/ppc_wrappers/mmintrin.h +1450 -0
  120. package/lib/clang/12.0.1/include/ppc_wrappers/pmmintrin.h +150 -0
  121. package/lib/clang/12.0.1/include/ppc_wrappers/smmintrin.h +109 -0
  122. package/lib/clang/12.0.1/include/ppc_wrappers/tmmintrin.h +495 -0
  123. package/lib/clang/12.0.1/include/ppc_wrappers/xmmintrin.h +1843 -0
  124. package/lib/clang/12.0.1/include/prfchwintrin.h +55 -0
  125. package/lib/clang/12.0.1/include/ptwriteintrin.h +37 -0
  126. package/lib/clang/12.0.1/include/rdseedintrin.h +42 -0
  127. package/lib/clang/12.0.1/include/rtmintrin.h +45 -0
  128. package/lib/clang/12.0.1/include/s390intrin.h +25 -0
  129. package/lib/clang/12.0.1/include/serializeintrin.h +30 -0
  130. package/lib/clang/12.0.1/include/sgxintrin.h +60 -0
  131. package/lib/clang/12.0.1/include/shaintrin.h +61 -0
  132. package/lib/clang/12.0.1/include/smmintrin.h +2430 -0
  133. package/lib/clang/12.0.1/include/stdalign.h +21 -0
  134. package/lib/clang/12.0.1/include/stdarg.h +35 -0
  135. package/lib/clang/12.0.1/include/stdatomic.h +176 -0
  136. package/lib/clang/12.0.1/include/stdbool.h +31 -0
  137. package/lib/clang/12.0.1/include/stddef.h +121 -0
  138. package/lib/clang/12.0.1/include/stdint.h +693 -0
  139. package/lib/clang/12.0.1/include/stdnoreturn.h +16 -0
  140. package/lib/clang/12.0.1/include/tbmintrin.h +140 -0
  141. package/lib/clang/12.0.1/include/tgmath.h +1368 -0
  142. package/lib/clang/12.0.1/include/tmmintrin.h +771 -0
  143. package/lib/clang/12.0.1/include/tsxldtrkintrin.h +56 -0
  144. package/lib/clang/12.0.1/include/uintrintrin.h +150 -0
  145. package/lib/clang/12.0.1/include/unwind.h +327 -0
  146. package/lib/clang/12.0.1/include/vadefs.h +51 -0
  147. package/lib/clang/12.0.1/include/vaesintrin.h +84 -0
  148. package/lib/clang/12.0.1/include/varargs.h +12 -0
  149. package/lib/clang/12.0.1/include/vecintrin.h +10998 -0
  150. package/lib/clang/12.0.1/include/vpclmulqdqintrin.h +28 -0
  151. package/lib/clang/12.0.1/include/waitpkgintrin.h +42 -0
  152. package/lib/clang/12.0.1/include/wasm_simd128.h +1167 -0
  153. package/lib/clang/12.0.1/include/wbnoinvdintrin.h +24 -0
  154. package/lib/clang/12.0.1/include/wmmintrin.h +19 -0
  155. package/lib/clang/12.0.1/include/x86gprintrin.h +23 -0
  156. package/lib/clang/12.0.1/include/x86intrin.h +63 -0
  157. package/lib/clang/12.0.1/include/xmmintrin.h +3008 -0
  158. package/lib/clang/12.0.1/include/xopintrin.h +770 -0
  159. package/lib/clang/12.0.1/include/xsavecintrin.h +34 -0
  160. package/lib/clang/12.0.1/include/xsaveintrin.h +63 -0
  161. package/lib/clang/12.0.1/include/xsaveoptintrin.h +34 -0
  162. package/lib/clang/12.0.1/include/xsavesintrin.h +44 -0
  163. package/lib/clang/12.0.1/include/xtestintrin.h +27 -0
  164. package/package.json +32 -0
@@ -0,0 +1,474 @@
1
+ /*===--------- avx512vlbf16intrin.h - AVX512_BF16 intrinsics ---------------===
2
+ *
3
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ * See https://llvm.org/LICENSE.txt for license information.
5
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ *
7
+ *===-----------------------------------------------------------------------===
8
+ */
9
+ #ifndef __IMMINTRIN_H
10
+ #error "Never use <avx512vlbf16intrin.h> directly; include <immintrin.h> instead."
11
+ #endif
12
+
13
+ #ifndef __AVX512VLBF16INTRIN_H
14
+ #define __AVX512VLBF16INTRIN_H
15
+
16
+ typedef short __m128bh __attribute__((__vector_size__(16), __aligned__(16)));
17
+
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)))
24
+
25
+ /// Convert Two Packed Single Data to One Packed BF16 Data.
26
+ ///
27
+ /// \headerfile <x86intrin.h>
28
+ ///
29
+ /// This intrinsic corresponds to the <c> VCVTNE2PS2BF16 </c> instructions.
30
+ ///
31
+ /// \param __A
32
+ /// A 128-bit vector of [4 x float].
33
+ /// \param __B
34
+ /// A 128-bit vector of [4 x float].
35
+ /// \returns A 128-bit vector of [8 x bfloat] whose lower 64 bits come from
36
+ /// conversion of __B, and higher 64 bits come from conversion of __A.
37
+ static __inline__ __m128bh __DEFAULT_FN_ATTRS128
38
+ _mm_cvtne2ps_pbh(__m128 __A, __m128 __B) {
39
+ return (__m128bh)__builtin_ia32_cvtne2ps2bf16_128((__v4sf) __A,
40
+ (__v4sf) __B);
41
+ }
42
+
43
+ /// Convert Two Packed Single Data to One Packed BF16 Data.
44
+ ///
45
+ /// \headerfile <x86intrin.h>
46
+ ///
47
+ /// This intrinsic corresponds to the <c> VCVTNE2PS2BF16 </c> instructions.
48
+ ///
49
+ /// \param __A
50
+ /// A 128-bit vector of [4 x float].
51
+ /// \param __B
52
+ /// A 128-bit vector of [4 x float].
53
+ /// \param __W
54
+ /// A 128-bit vector of [8 x bfloat].
55
+ /// \param __U
56
+ /// A 8-bit mask value specifying what is chosen for each element.
57
+ /// A 1 means conversion of __A or __B. A 0 means element from __W.
58
+ /// \returns A 128-bit vector of [8 x bfloat] whose lower 64 bits come from
59
+ /// conversion of __B, and higher 64 bits come from conversion of __A.
60
+ static __inline__ __m128bh __DEFAULT_FN_ATTRS128
61
+ _mm_mask_cvtne2ps_pbh(__m128bh __W, __mmask8 __U, __m128 __A, __m128 __B) {
62
+ return (__m128bh)__builtin_ia32_selectw_128((__mmask8)__U,
63
+ (__v8hi)_mm_cvtne2ps_pbh(__A, __B),
64
+ (__v8hi)__W);
65
+ }
66
+
67
+ /// Convert Two Packed Single Data to One Packed BF16 Data.
68
+ ///
69
+ /// \headerfile <x86intrin.h>
70
+ ///
71
+ /// This intrinsic corresponds to the <c> VCVTNE2PS2BF16 </c> instructions.
72
+ ///
73
+ /// \param __A
74
+ /// A 128-bit vector of [4 x float].
75
+ /// \param __B
76
+ /// A 128-bit vector of [4 x float].
77
+ /// \param __U
78
+ /// A 8-bit mask value specifying what is chosen for each element.
79
+ /// A 1 means conversion of __A or __B. A 0 means element is zero.
80
+ /// \returns A 128-bit vector of [8 x bfloat] whose lower 64 bits come from
81
+ /// conversion of __B, and higher 64 bits come from conversion of __A.
82
+ static __inline__ __m128bh __DEFAULT_FN_ATTRS128
83
+ _mm_maskz_cvtne2ps_pbh(__mmask8 __U, __m128 __A, __m128 __B) {
84
+ return (__m128bh)__builtin_ia32_selectw_128((__mmask8)__U,
85
+ (__v8hi)_mm_cvtne2ps_pbh(__A, __B),
86
+ (__v8hi)_mm_setzero_si128());
87
+ }
88
+
89
+ /// Convert Two Packed Single Data to One Packed BF16 Data.
90
+ ///
91
+ /// \headerfile <x86intrin.h>
92
+ ///
93
+ /// This intrinsic corresponds to the <c> VCVTNE2PS2BF16 </c> instructions.
94
+ ///
95
+ /// \param __A
96
+ /// A 256-bit vector of [8 x float].
97
+ /// \param __B
98
+ /// A 256-bit vector of [8 x float].
99
+ /// \returns A 256-bit vector of [16 x bfloat] whose lower 128 bits come from
100
+ /// conversion of __B, and higher 128 bits come from conversion of __A.
101
+ static __inline__ __m256bh __DEFAULT_FN_ATTRS256
102
+ _mm256_cvtne2ps_pbh(__m256 __A, __m256 __B) {
103
+ return (__m256bh)__builtin_ia32_cvtne2ps2bf16_256((__v8sf) __A,
104
+ (__v8sf) __B);
105
+ }
106
+
107
+ /// Convert Two Packed Single Data to One Packed BF16 Data.
108
+ ///
109
+ /// \headerfile <x86intrin.h>
110
+ ///
111
+ /// This intrinsic corresponds to the <c> VCVTNE2PS2BF16 </c> instructions.
112
+ ///
113
+ /// \param __A
114
+ /// A 256-bit vector of [8 x float].
115
+ /// \param __B
116
+ /// A 256-bit vector of [8 x float].
117
+ /// \param __W
118
+ /// A 256-bit vector of [16 x bfloat].
119
+ /// \param __U
120
+ /// A 16-bit mask value specifying what is chosen for each element.
121
+ /// A 1 means conversion of __A or __B. A 0 means element from __W.
122
+ /// \returns A 256-bit vector of [16 x bfloat] whose lower 128 bits come from
123
+ /// conversion of __B, and higher 128 bits come from conversion of __A.
124
+ static __inline__ __m256bh __DEFAULT_FN_ATTRS256
125
+ _mm256_mask_cvtne2ps_pbh(__m256bh __W, __mmask16 __U, __m256 __A, __m256 __B) {
126
+ return (__m256bh)__builtin_ia32_selectw_256((__mmask16)__U,
127
+ (__v16hi)_mm256_cvtne2ps_pbh(__A, __B),
128
+ (__v16hi)__W);
129
+ }
130
+
131
+ /// Convert Two Packed Single Data to One Packed BF16 Data.
132
+ ///
133
+ /// \headerfile <x86intrin.h>
134
+ ///
135
+ /// This intrinsic corresponds to the <c> VCVTNE2PS2BF16 </c> instructions.
136
+ ///
137
+ /// \param __A
138
+ /// A 256-bit vector of [8 x float].
139
+ /// \param __B
140
+ /// A 256-bit vector of [8 x float].
141
+ /// \param __U
142
+ /// A 16-bit mask value specifying what is chosen for each element.
143
+ /// A 1 means conversion of __A or __B. A 0 means element is zero.
144
+ /// \returns A 256-bit vector of [16 x bfloat] whose lower 128 bits come from
145
+ /// conversion of __B, and higher 128 bits come from conversion of __A.
146
+ static __inline__ __m256bh __DEFAULT_FN_ATTRS256
147
+ _mm256_maskz_cvtne2ps_pbh(__mmask16 __U, __m256 __A, __m256 __B) {
148
+ return (__m256bh)__builtin_ia32_selectw_256((__mmask16)__U,
149
+ (__v16hi)_mm256_cvtne2ps_pbh(__A, __B),
150
+ (__v16hi)_mm256_setzero_si256());
151
+ }
152
+
153
+ /// Convert Packed Single Data to Packed BF16 Data.
154
+ ///
155
+ /// \headerfile <x86intrin.h>
156
+ ///
157
+ /// This intrinsic corresponds to the <c> VCVTNEPS2BF16 </c> instructions.
158
+ ///
159
+ /// \param __A
160
+ /// A 128-bit vector of [4 x float].
161
+ /// \returns A 128-bit vector of [8 x bfloat] whose lower 64 bits come from
162
+ /// conversion of __A, and higher 64 bits are 0.
163
+ static __inline__ __m128bh __DEFAULT_FN_ATTRS128
164
+ _mm_cvtneps_pbh(__m128 __A) {
165
+ return (__m128bh)__builtin_ia32_cvtneps2bf16_128_mask((__v4sf) __A,
166
+ (__v8hi)_mm_undefined_si128(),
167
+ (__mmask8)-1);
168
+ }
169
+
170
+ /// Convert Packed Single Data to Packed BF16 Data.
171
+ ///
172
+ /// \headerfile <x86intrin.h>
173
+ ///
174
+ /// This intrinsic corresponds to the <c> VCVTNEPS2BF16 </c> instructions.
175
+ ///
176
+ /// \param __A
177
+ /// A 128-bit vector of [4 x float].
178
+ /// \param __W
179
+ /// A 128-bit vector of [8 x bfloat].
180
+ /// \param __U
181
+ /// A 4-bit mask value specifying what is chosen for each element.
182
+ /// A 1 means conversion of __A. A 0 means element from __W.
183
+ /// \returns A 128-bit vector of [8 x bfloat] whose lower 64 bits come from
184
+ /// conversion of __A, and higher 64 bits are 0.
185
+ static __inline__ __m128bh __DEFAULT_FN_ATTRS128
186
+ _mm_mask_cvtneps_pbh(__m128bh __W, __mmask8 __U, __m128 __A) {
187
+ return (__m128bh)__builtin_ia32_cvtneps2bf16_128_mask((__v4sf) __A,
188
+ (__v8hi)__W,
189
+ (__mmask8)__U);
190
+ }
191
+
192
+ /// Convert Packed Single Data to Packed BF16 Data.
193
+ ///
194
+ /// \headerfile <x86intrin.h>
195
+ ///
196
+ /// This intrinsic corresponds to the <c> VCVTNEPS2BF16 </c> instructions.
197
+ ///
198
+ /// \param __A
199
+ /// A 128-bit vector of [4 x float].
200
+ /// \param __U
201
+ /// A 4-bit mask value specifying what is chosen for each element.
202
+ /// A 1 means conversion of __A. A 0 means element is zero.
203
+ /// \returns A 128-bit vector of [8 x bfloat] whose lower 64 bits come from
204
+ /// conversion of __A, and higher 64 bits are 0.
205
+ static __inline__ __m128bh __DEFAULT_FN_ATTRS128
206
+ _mm_maskz_cvtneps_pbh(__mmask8 __U, __m128 __A) {
207
+ return (__m128bh)__builtin_ia32_cvtneps2bf16_128_mask((__v4sf) __A,
208
+ (__v8hi)_mm_setzero_si128(),
209
+ (__mmask8)__U);
210
+ }
211
+
212
+ /// Convert Packed Single Data to Packed BF16 Data.
213
+ ///
214
+ /// \headerfile <x86intrin.h>
215
+ ///
216
+ /// This intrinsic corresponds to the <c> VCVTNEPS2BF16 </c> instructions.
217
+ ///
218
+ /// \param __A
219
+ /// A 256-bit vector of [8 x float].
220
+ /// \returns A 128-bit vector of [8 x bfloat] comes from conversion of __A.
221
+ static __inline__ __m128bh __DEFAULT_FN_ATTRS256
222
+ _mm256_cvtneps_pbh(__m256 __A) {
223
+ return (__m128bh)__builtin_ia32_cvtneps2bf16_256_mask((__v8sf)__A,
224
+ (__v8hi)_mm_undefined_si128(),
225
+ (__mmask8)-1);
226
+ }
227
+
228
+ /// Convert Packed Single Data to Packed BF16 Data.
229
+ ///
230
+ /// \headerfile <x86intrin.h>
231
+ ///
232
+ /// This intrinsic corresponds to the <c> VCVTNEPS2BF16 </c> instructions.
233
+ ///
234
+ /// \param __A
235
+ /// A 256-bit vector of [8 x float].
236
+ /// \param __W
237
+ /// A 256-bit vector of [8 x bfloat].
238
+ /// \param __U
239
+ /// A 8-bit mask value specifying what is chosen for each element.
240
+ /// A 1 means conversion of __A. A 0 means element from __W.
241
+ /// \returns A 128-bit vector of [8 x bfloat] comes from conversion of __A.
242
+ static __inline__ __m128bh __DEFAULT_FN_ATTRS256
243
+ _mm256_mask_cvtneps_pbh(__m128bh __W, __mmask8 __U, __m256 __A) {
244
+ return (__m128bh)__builtin_ia32_cvtneps2bf16_256_mask((__v8sf)__A,
245
+ (__v8hi)__W,
246
+ (__mmask8)__U);
247
+ }
248
+
249
+ /// Convert Packed Single Data to Packed BF16 Data.
250
+ ///
251
+ /// \headerfile <x86intrin.h>
252
+ ///
253
+ /// This intrinsic corresponds to the <c> VCVTNEPS2BF16 </c> instructions.
254
+ ///
255
+ /// \param __A
256
+ /// A 256-bit vector of [8 x float].
257
+ /// \param __U
258
+ /// A 8-bit mask value specifying what is chosen for each element.
259
+ /// A 1 means conversion of __A. A 0 means element is zero.
260
+ /// \returns A 128-bit vector of [8 x bfloat] comes from conversion of __A.
261
+ static __inline__ __m128bh __DEFAULT_FN_ATTRS256
262
+ _mm256_maskz_cvtneps_pbh(__mmask8 __U, __m256 __A) {
263
+ return (__m128bh)__builtin_ia32_cvtneps2bf16_256_mask((__v8sf)__A,
264
+ (__v8hi)_mm_setzero_si128(),
265
+ (__mmask8)__U);
266
+ }
267
+
268
+ /// Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
269
+ ///
270
+ /// \headerfile <x86intrin.h>
271
+ ///
272
+ /// This intrinsic corresponds to the <c> VDPBF16PS </c> instructions.
273
+ ///
274
+ /// \param __A
275
+ /// A 128-bit vector of [8 x bfloat].
276
+ /// \param __B
277
+ /// A 128-bit vector of [8 x bfloat].
278
+ /// \param __D
279
+ /// A 128-bit vector of [4 x float].
280
+ /// \returns A 128-bit vector of [4 x float] comes from Dot Product of
281
+ /// __A, __B and __D
282
+ static __inline__ __m128 __DEFAULT_FN_ATTRS128
283
+ _mm_dpbf16_ps(__m128 __D, __m128bh __A, __m128bh __B) {
284
+ return (__m128)__builtin_ia32_dpbf16ps_128((__v4sf)__D,
285
+ (__v4si)__A,
286
+ (__v4si)__B);
287
+ }
288
+
289
+ /// Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
290
+ ///
291
+ /// \headerfile <x86intrin.h>
292
+ ///
293
+ /// This intrinsic corresponds to the <c> VDPBF16PS </c> instructions.
294
+ ///
295
+ /// \param __A
296
+ /// A 128-bit vector of [8 x bfloat].
297
+ /// \param __B
298
+ /// A 128-bit vector of [8 x bfloat].
299
+ /// \param __D
300
+ /// A 128-bit vector of [4 x float].
301
+ /// \param __U
302
+ /// A 8-bit mask value specifying what is chosen for each element.
303
+ /// A 1 means __A and __B's dot product accumulated with __D. A 0 means __D.
304
+ /// \returns A 128-bit vector of [4 x float] comes from Dot Product of
305
+ /// __A, __B and __D
306
+ static __inline__ __m128 __DEFAULT_FN_ATTRS128
307
+ _mm_mask_dpbf16_ps(__m128 __D, __mmask8 __U, __m128bh __A, __m128bh __B) {
308
+ return (__m128)__builtin_ia32_selectps_128((__mmask8)__U,
309
+ (__v4sf)_mm_dpbf16_ps(__D, __A, __B),
310
+ (__v4sf)__D);
311
+ }
312
+
313
+ /// Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
314
+ ///
315
+ /// \headerfile <x86intrin.h>
316
+ ///
317
+ /// This intrinsic corresponds to the <c> VDPBF16PS </c> instructions.
318
+ ///
319
+ /// \param __A
320
+ /// A 128-bit vector of [8 x bfloat].
321
+ /// \param __B
322
+ /// A 128-bit vector of [8 x bfloat].
323
+ /// \param __D
324
+ /// A 128-bit vector of [4 x float].
325
+ /// \param __U
326
+ /// A 8-bit mask value specifying what is chosen for each element.
327
+ /// A 1 means __A and __B's dot product accumulated with __D. A 0 means 0.
328
+ /// \returns A 128-bit vector of [4 x float] comes from Dot Product of
329
+ /// __A, __B and __D
330
+ static __inline__ __m128 __DEFAULT_FN_ATTRS128
331
+ _mm_maskz_dpbf16_ps(__mmask8 __U, __m128 __D, __m128bh __A, __m128bh __B) {
332
+ return (__m128)__builtin_ia32_selectps_128((__mmask8)__U,
333
+ (__v4sf)_mm_dpbf16_ps(__D, __A, __B),
334
+ (__v4sf)_mm_setzero_si128());
335
+ }
336
+
337
+ /// Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
338
+ ///
339
+ /// \headerfile <x86intrin.h>
340
+ ///
341
+ /// This intrinsic corresponds to the <c> VDPBF16PS </c> instructions.
342
+ ///
343
+ /// \param __A
344
+ /// A 256-bit vector of [16 x bfloat].
345
+ /// \param __B
346
+ /// A 256-bit vector of [16 x bfloat].
347
+ /// \param __D
348
+ /// A 256-bit vector of [8 x float].
349
+ /// \returns A 256-bit vector of [8 x float] comes from Dot Product of
350
+ /// __A, __B and __D
351
+ static __inline__ __m256 __DEFAULT_FN_ATTRS256
352
+ _mm256_dpbf16_ps(__m256 __D, __m256bh __A, __m256bh __B) {
353
+ return (__m256)__builtin_ia32_dpbf16ps_256((__v8sf)__D,
354
+ (__v8si)__A,
355
+ (__v8si)__B);
356
+ }
357
+
358
+ /// Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
359
+ ///
360
+ /// \headerfile <x86intrin.h>
361
+ ///
362
+ /// This intrinsic corresponds to the <c> VDPBF16PS </c> instructions.
363
+ ///
364
+ /// \param __A
365
+ /// A 256-bit vector of [16 x bfloat].
366
+ /// \param __B
367
+ /// A 256-bit vector of [16 x bfloat].
368
+ /// \param __D
369
+ /// A 256-bit vector of [8 x float].
370
+ /// \param __U
371
+ /// A 16-bit mask value specifying what is chosen for each element.
372
+ /// A 1 means __A and __B's dot product accumulated with __D. A 0 means __D.
373
+ /// \returns A 256-bit vector of [8 x float] comes from Dot Product of
374
+ /// __A, __B and __D
375
+ static __inline__ __m256 __DEFAULT_FN_ATTRS256
376
+ _mm256_mask_dpbf16_ps(__m256 __D, __mmask8 __U, __m256bh __A, __m256bh __B) {
377
+ return (__m256)__builtin_ia32_selectps_256((__mmask8)__U,
378
+ (__v8sf)_mm256_dpbf16_ps(__D, __A, __B),
379
+ (__v8sf)__D);
380
+ }
381
+
382
+ /// Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
383
+ ///
384
+ /// \headerfile <x86intrin.h>
385
+ ///
386
+ /// This intrinsic corresponds to the <c> VDPBF16PS </c> instructions.
387
+ ///
388
+ /// \param __A
389
+ /// A 256-bit vector of [16 x bfloat].
390
+ /// \param __B
391
+ /// A 256-bit vector of [16 x bfloat].
392
+ /// \param __D
393
+ /// A 256-bit vector of [8 x float].
394
+ /// \param __U
395
+ /// A 8-bit mask value specifying what is chosen for each element.
396
+ /// A 1 means __A and __B's dot product accumulated with __D. A 0 means 0.
397
+ /// \returns A 256-bit vector of [8 x float] comes from Dot Product of
398
+ /// __A, __B and __D
399
+ static __inline__ __m256 __DEFAULT_FN_ATTRS256
400
+ _mm256_maskz_dpbf16_ps(__mmask8 __U, __m256 __D, __m256bh __A, __m256bh __B) {
401
+ return (__m256)__builtin_ia32_selectps_256((__mmask8)__U,
402
+ (__v8sf)_mm256_dpbf16_ps(__D, __A, __B),
403
+ (__v8sf)_mm256_setzero_si256());
404
+ }
405
+
406
+ /// Convert One Single float Data to One BF16 Data.
407
+ ///
408
+ /// \headerfile <x86intrin.h>
409
+ ///
410
+ /// This intrinsic corresponds to the <c> VCVTNEPS2BF16 </c> instructions.
411
+ ///
412
+ /// \param __A
413
+ /// A float data.
414
+ /// \returns A bf16 data whose sign field and exponent field keep unchanged,
415
+ /// and fraction field is truncated to 7 bits.
416
+ static __inline__ __bfloat16 __DEFAULT_FN_ATTRS128 _mm_cvtness_sbh(float __A) {
417
+ __v4sf __V = {__A, 0, 0, 0};
418
+ __v8hi __R = __builtin_ia32_cvtneps2bf16_128_mask(
419
+ (__v4sf)__V, (__v8hi)_mm_undefined_si128(), (__mmask8)-1);
420
+ return __R[0];
421
+ }
422
+
423
+ /// Convert Packed BF16 Data to Packed float Data.
424
+ ///
425
+ /// \headerfile <x86intrin.h>
426
+ ///
427
+ /// \param __A
428
+ /// A 128-bit vector of [8 x bfloat].
429
+ /// \returns A 256-bit vector of [8 x float] come from convertion of __A
430
+ static __inline__ __m256 __DEFAULT_FN_ATTRS256 _mm256_cvtpbh_ps(__m128bh __A) {
431
+ return _mm256_castsi256_ps((__m256i)_mm256_slli_epi32(
432
+ (__m256i)_mm256_cvtepi16_epi32((__m128i)__A), 16));
433
+ }
434
+
435
+ /// Convert Packed BF16 Data to Packed float Data using zeroing mask.
436
+ ///
437
+ /// \headerfile <x86intrin.h>
438
+ ///
439
+ /// \param __U
440
+ /// A 8-bit mask. Elements are zeroed out when the corresponding mask
441
+ /// bit is not set.
442
+ /// \param __A
443
+ /// A 128-bit vector of [8 x bfloat].
444
+ /// \returns A 256-bit vector of [8 x float] come from convertion of __A
445
+ static __inline__ __m256 __DEFAULT_FN_ATTRS256
446
+ _mm256_maskz_cvtpbh_ps(__mmask8 __U, __m128bh __A) {
447
+ return _mm256_castsi256_ps((__m256i)_mm256_slli_epi32(
448
+ (__m256i)_mm256_maskz_cvtepi16_epi32((__mmask8)__U, (__m128i)__A), 16));
449
+ }
450
+
451
+ /// Convert Packed BF16 Data to Packed float Data using merging mask.
452
+ ///
453
+ /// \headerfile <x86intrin.h>
454
+ ///
455
+ /// \param __S
456
+ /// A 256-bit vector of [8 x float]. Elements are copied from __S when
457
+ /// the corresponding mask bit is not set.
458
+ /// \param __U
459
+ /// A 8-bit mask. Elements are zeroed out when the corresponding mask
460
+ /// bit is not set.
461
+ /// \param __A
462
+ /// A 128-bit vector of [8 x bfloat].
463
+ /// \returns A 256-bit vector of [8 x float] come from convertion of __A
464
+ static __inline__ __m256 __DEFAULT_FN_ATTRS256
465
+ _mm256_mask_cvtpbh_ps(__m256 __S, __mmask8 __U, __m128bh __A) {
466
+ return _mm256_castsi256_ps((__m256i)_mm256_mask_slli_epi32(
467
+ (__m256i)__S, (__mmask8)__U, (__m256i)_mm256_cvtepi16_epi32((__m128i)__A),
468
+ 16));
469
+ }
470
+
471
+ #undef __DEFAULT_FN_ATTRS128
472
+ #undef __DEFAULT_FN_ATTRS256
473
+
474
+ #endif
@@ -0,0 +1,145 @@
1
+ /*===---- avx512vlbitalgintrin.h - BITALG intrinsics -----------------------===
2
+ *
3
+ *
4
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5
+ * See https://llvm.org/LICENSE.txt for license information.
6
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
+ *
8
+ *===-----------------------------------------------------------------------===
9
+ */
10
+ #ifndef __IMMINTRIN_H
11
+ #error "Never use <avx512vlbitalgintrin.h> directly; include <immintrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __AVX512VLBITALGINTRIN_H
15
+ #define __AVX512VLBITALGINTRIN_H
16
+
17
+ /* Define the default attributes for the functions in this file. */
18
+ #define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512bitalg"), __min_vector_width__(128)))
19
+ #define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512bitalg"), __min_vector_width__(256)))
20
+
21
+ static __inline__ __m256i __DEFAULT_FN_ATTRS256
22
+ _mm256_popcnt_epi16(__m256i __A)
23
+ {
24
+ return (__m256i) __builtin_ia32_vpopcntw_256((__v16hi) __A);
25
+ }
26
+
27
+ static __inline__ __m256i __DEFAULT_FN_ATTRS256
28
+ _mm256_mask_popcnt_epi16(__m256i __A, __mmask16 __U, __m256i __B)
29
+ {
30
+ return (__m256i) __builtin_ia32_selectw_256((__mmask16) __U,
31
+ (__v16hi) _mm256_popcnt_epi16(__B),
32
+ (__v16hi) __A);
33
+ }
34
+
35
+ static __inline__ __m256i __DEFAULT_FN_ATTRS256
36
+ _mm256_maskz_popcnt_epi16(__mmask16 __U, __m256i __B)
37
+ {
38
+ return _mm256_mask_popcnt_epi16((__m256i) _mm256_setzero_si256(),
39
+ __U,
40
+ __B);
41
+ }
42
+
43
+ static __inline__ __m128i __DEFAULT_FN_ATTRS128
44
+ _mm_popcnt_epi16(__m128i __A)
45
+ {
46
+ return (__m128i) __builtin_ia32_vpopcntw_128((__v8hi) __A);
47
+ }
48
+
49
+ static __inline__ __m128i __DEFAULT_FN_ATTRS128
50
+ _mm_mask_popcnt_epi16(__m128i __A, __mmask8 __U, __m128i __B)
51
+ {
52
+ return (__m128i) __builtin_ia32_selectw_128((__mmask8) __U,
53
+ (__v8hi) _mm_popcnt_epi16(__B),
54
+ (__v8hi) __A);
55
+ }
56
+
57
+ static __inline__ __m128i __DEFAULT_FN_ATTRS128
58
+ _mm_maskz_popcnt_epi16(__mmask8 __U, __m128i __B)
59
+ {
60
+ return _mm_mask_popcnt_epi16((__m128i) _mm_setzero_si128(),
61
+ __U,
62
+ __B);
63
+ }
64
+
65
+ static __inline__ __m256i __DEFAULT_FN_ATTRS256
66
+ _mm256_popcnt_epi8(__m256i __A)
67
+ {
68
+ return (__m256i) __builtin_ia32_vpopcntb_256((__v32qi) __A);
69
+ }
70
+
71
+ static __inline__ __m256i __DEFAULT_FN_ATTRS256
72
+ _mm256_mask_popcnt_epi8(__m256i __A, __mmask32 __U, __m256i __B)
73
+ {
74
+ return (__m256i) __builtin_ia32_selectb_256((__mmask32) __U,
75
+ (__v32qi) _mm256_popcnt_epi8(__B),
76
+ (__v32qi) __A);
77
+ }
78
+
79
+ static __inline__ __m256i __DEFAULT_FN_ATTRS256
80
+ _mm256_maskz_popcnt_epi8(__mmask32 __U, __m256i __B)
81
+ {
82
+ return _mm256_mask_popcnt_epi8((__m256i) _mm256_setzero_si256(),
83
+ __U,
84
+ __B);
85
+ }
86
+
87
+ static __inline__ __m128i __DEFAULT_FN_ATTRS128
88
+ _mm_popcnt_epi8(__m128i __A)
89
+ {
90
+ return (__m128i) __builtin_ia32_vpopcntb_128((__v16qi) __A);
91
+ }
92
+
93
+ static __inline__ __m128i __DEFAULT_FN_ATTRS128
94
+ _mm_mask_popcnt_epi8(__m128i __A, __mmask16 __U, __m128i __B)
95
+ {
96
+ return (__m128i) __builtin_ia32_selectb_128((__mmask16) __U,
97
+ (__v16qi) _mm_popcnt_epi8(__B),
98
+ (__v16qi) __A);
99
+ }
100
+
101
+ static __inline__ __m128i __DEFAULT_FN_ATTRS128
102
+ _mm_maskz_popcnt_epi8(__mmask16 __U, __m128i __B)
103
+ {
104
+ return _mm_mask_popcnt_epi8((__m128i) _mm_setzero_si128(),
105
+ __U,
106
+ __B);
107
+ }
108
+
109
+ static __inline__ __mmask32 __DEFAULT_FN_ATTRS256
110
+ _mm256_mask_bitshuffle_epi64_mask(__mmask32 __U, __m256i __A, __m256i __B)
111
+ {
112
+ return (__mmask32) __builtin_ia32_vpshufbitqmb256_mask((__v32qi) __A,
113
+ (__v32qi) __B,
114
+ __U);
115
+ }
116
+
117
+ static __inline__ __mmask32 __DEFAULT_FN_ATTRS256
118
+ _mm256_bitshuffle_epi64_mask(__m256i __A, __m256i __B)
119
+ {
120
+ return _mm256_mask_bitshuffle_epi64_mask((__mmask32) -1,
121
+ __A,
122
+ __B);
123
+ }
124
+
125
+ static __inline__ __mmask16 __DEFAULT_FN_ATTRS128
126
+ _mm_mask_bitshuffle_epi64_mask(__mmask16 __U, __m128i __A, __m128i __B)
127
+ {
128
+ return (__mmask16) __builtin_ia32_vpshufbitqmb128_mask((__v16qi) __A,
129
+ (__v16qi) __B,
130
+ __U);
131
+ }
132
+
133
+ static __inline__ __mmask16 __DEFAULT_FN_ATTRS128
134
+ _mm_bitshuffle_epi64_mask(__m128i __A, __m128i __B)
135
+ {
136
+ return _mm_mask_bitshuffle_epi64_mask((__mmask16) -1,
137
+ __A,
138
+ __B);
139
+ }
140
+
141
+
142
+ #undef __DEFAULT_FN_ATTRS128
143
+ #undef __DEFAULT_FN_ATTRS256
144
+
145
+ #endif