@cpp-linter/clang-tidy-darwin-x64 14.0.0 → 17.0.6

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 (227) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy +2 -2
  3. package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_intrinsics.h +198 -7
  4. package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_math.h +1 -1
  5. package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_texture_intrinsics.h +2 -0
  6. package/lib/clang/{14.0.0 → 17}/include/__clang_hip_cmath.h +1 -1
  7. package/lib/clang/{14.0.0 → 17}/include/__clang_hip_libdevice_declares.h +37 -30
  8. package/lib/clang/{14.0.0 → 17}/include/__clang_hip_math.h +66 -84
  9. package/lib/clang/{14.0.0 → 17}/include/__clang_hip_runtime_wrapper.h +14 -0
  10. package/lib/clang/17/include/__clang_hip_stdlib.h +43 -0
  11. package/lib/clang/{14.0.0 → 17}/include/__wmmintrin_pclmul.h +10 -10
  12. package/lib/clang/17/include/adxintrin.h +227 -0
  13. package/lib/clang/{14.0.0 → 17}/include/altivec.h +597 -346
  14. package/lib/clang/17/include/amxcomplexintrin.h +169 -0
  15. package/lib/clang/17/include/amxfp16intrin.h +58 -0
  16. package/lib/clang/{14.0.0 → 17}/include/amxintrin.h +32 -2
  17. package/lib/clang/{14.0.0 → 17}/include/arm_acle.h +86 -81
  18. package/lib/clang/{14.0.0 → 17}/include/arm_fp16.h +90 -90
  19. package/lib/clang/{14.0.0 → 17}/include/arm_neon.h +28567 -28574
  20. package/lib/clang/{14.0.0 → 17}/include/arm_neon_sve_bridge.h +0 -2
  21. package/lib/clang/17/include/arm_sme_draft_spec_subject_to_change.h +642 -0
  22. package/lib/clang/{14.0.0 → 17}/include/arm_sve.h +7916 -8009
  23. package/lib/clang/17/include/avx2intrin.h +5263 -0
  24. package/lib/clang/{14.0.0 → 17}/include/avx512bf16intrin.h +18 -15
  25. package/lib/clang/{14.0.0 → 17}/include/avx512bwintrin.h +12 -12
  26. package/lib/clang/{14.0.0 → 17}/include/avx512fintrin.h +95 -82
  27. package/lib/clang/{14.0.0 → 17}/include/avx512fp16intrin.h +18 -17
  28. package/lib/clang/{14.0.0 → 17}/include/avx512ifmavlintrin.h +13 -27
  29. package/lib/clang/{14.0.0 → 17}/include/avx512vlbf16intrin.h +31 -38
  30. package/lib/clang/{14.0.0 → 17}/include/avx512vlbwintrin.h +360 -8
  31. package/lib/clang/{14.0.0 → 17}/include/avx512vlfp16intrin.h +3 -0
  32. package/lib/clang/{14.0.0 → 17}/include/avx512vlintrin.h +81 -95
  33. package/lib/clang/{14.0.0 → 17}/include/avx512vlvnniintrin.h +16 -16
  34. package/lib/clang/17/include/avxifmaintrin.h +177 -0
  35. package/lib/clang/{14.0.0 → 17}/include/avxintrin.h +97 -39
  36. package/lib/clang/17/include/avxneconvertintrin.h +484 -0
  37. package/lib/clang/17/include/avxvnniint16intrin.h +473 -0
  38. package/lib/clang/17/include/avxvnniint8intrin.h +471 -0
  39. package/lib/clang/{14.0.0 → 17}/include/avxvnniintrin.h +16 -16
  40. package/lib/clang/17/include/bmi2intrin.h +255 -0
  41. package/lib/clang/{14.0.0 → 17}/include/bmiintrin.h +6 -2
  42. package/lib/clang/{14.0.0 → 17}/include/cetintrin.h +12 -6
  43. package/lib/clang/{14.0.0 → 17}/include/clflushoptintrin.h +9 -0
  44. package/lib/clang/{14.0.0 → 17}/include/clzerointrin.h +7 -5
  45. package/lib/clang/17/include/cmpccxaddintrin.h +70 -0
  46. package/lib/clang/{14.0.0 → 17}/include/cpuid.h +12 -1
  47. package/lib/clang/17/include/cuda_wrappers/bits/basic_string.h +9 -0
  48. package/lib/clang/17/include/cuda_wrappers/bits/basic_string.tcc +9 -0
  49. package/lib/clang/17/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
  50. package/lib/clang/17/include/cuda_wrappers/cmath +90 -0
  51. package/lib/clang/{14.0.0 → 17}/include/emmintrin.h +559 -769
  52. package/lib/clang/{14.0.0 → 17}/include/f16cintrin.h +3 -3
  53. package/lib/clang/{14.0.0 → 17}/include/float.h +17 -10
  54. package/lib/clang/17/include/fmaintrin.h +780 -0
  55. package/lib/clang/{14.0.0 → 17}/include/gfniintrin.h +7 -5
  56. package/lib/clang/17/include/hlsl/hlsl_basic_types.h +67 -0
  57. package/lib/clang/17/include/hlsl/hlsl_intrinsics.h +480 -0
  58. package/lib/clang/17/include/hlsl.h +15 -0
  59. package/lib/clang/{14.0.0 → 17}/include/hresetintrin.h +2 -2
  60. package/lib/clang/{14.0.0 → 17}/include/ia32intrin.h +11 -11
  61. package/lib/clang/{14.0.0 → 17}/include/immintrin.h +166 -26
  62. package/lib/clang/{14.0.0 → 17}/include/intrin.h +12 -21
  63. package/lib/clang/{14.0.0 → 17}/include/keylockerintrin.h +22 -22
  64. package/lib/clang/17/include/larchintrin.h +234 -0
  65. package/lib/clang/{14.0.0 → 17}/include/limits.h +8 -3
  66. package/lib/clang/17/include/llvm_libc_wrappers/ctype.h +85 -0
  67. package/lib/clang/17/include/llvm_libc_wrappers/inttypes.h +34 -0
  68. package/lib/clang/17/include/llvm_libc_wrappers/stdio.h +34 -0
  69. package/lib/clang/17/include/llvm_libc_wrappers/stdlib.h +42 -0
  70. package/lib/clang/17/include/llvm_libc_wrappers/string.h +37 -0
  71. package/lib/clang/{14.0.0 → 17}/include/mm_malloc.h +3 -3
  72. package/lib/clang/17/include/mwaitxintrin.h +62 -0
  73. package/lib/clang/{14.0.0 → 17}/include/opencl-c-base.h +32 -0
  74. package/lib/clang/{14.0.0 → 17}/include/opencl-c.h +6904 -7100
  75. package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -1
  76. package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/new +1 -1
  77. package/lib/clang/{14.0.0 → 17}/include/pmmintrin.h +13 -7
  78. package/lib/clang/17/include/ppc_wrappers/bmi2intrin.h +134 -0
  79. package/lib/clang/17/include/ppc_wrappers/bmiintrin.h +165 -0
  80. package/lib/clang/17/include/ppc_wrappers/emmintrin.h +2269 -0
  81. package/lib/clang/17/include/ppc_wrappers/immintrin.h +27 -0
  82. package/lib/clang/{14.0.0 → 17}/include/ppc_wrappers/mm_malloc.h +12 -17
  83. package/lib/clang/{14.0.0 → 17}/include/ppc_wrappers/mmintrin.h +389 -387
  84. package/lib/clang/17/include/ppc_wrappers/pmmintrin.h +145 -0
  85. package/lib/clang/17/include/ppc_wrappers/smmintrin.h +663 -0
  86. package/lib/clang/17/include/ppc_wrappers/tmmintrin.h +453 -0
  87. package/lib/clang/{14.0.0/include/stdnoreturn.h → 17/include/ppc_wrappers/x86gprintrin.h} +7 -6
  88. package/lib/clang/17/include/ppc_wrappers/x86intrin.h +28 -0
  89. package/lib/clang/17/include/ppc_wrappers/xmmintrin.h +1827 -0
  90. package/lib/clang/17/include/prfchiintrin.h +61 -0
  91. package/lib/clang/17/include/raointintrin.h +203 -0
  92. package/lib/clang/17/include/rdpruintrin.h +57 -0
  93. package/lib/clang/17/include/rdseedintrin.h +105 -0
  94. package/lib/clang/17/include/riscv_ntlh.h +28 -0
  95. package/lib/clang/17/include/riscv_vector.h +400 -0
  96. package/lib/clang/{14.0.0 → 17}/include/rtmintrin.h +1 -1
  97. package/lib/clang/17/include/sha512intrin.h +200 -0
  98. package/lib/clang/17/include/shaintrin.h +189 -0
  99. package/lib/clang/17/include/sifive_vector.h +16 -0
  100. package/lib/clang/17/include/sm3intrin.h +238 -0
  101. package/lib/clang/17/include/sm4intrin.h +269 -0
  102. package/lib/clang/{14.0.0 → 17}/include/smmintrin.h +236 -259
  103. package/lib/clang/{14.0.0 → 17}/include/stdalign.h +5 -0
  104. package/lib/clang/{14.0.0 → 17}/include/stdarg.h +23 -7
  105. package/lib/clang/{14.0.0 → 17}/include/stdatomic.h +15 -8
  106. package/lib/clang/{14.0.0 → 17}/include/stdbool.h +10 -7
  107. package/lib/clang/{14.0.0 → 17}/include/stddef.h +14 -2
  108. package/lib/clang/{14.0.0 → 17}/include/stdint.h +158 -40
  109. package/lib/clang/17/include/stdnoreturn.h +29 -0
  110. package/lib/clang/{14.0.0 → 17}/include/uintrintrin.h +8 -8
  111. package/lib/clang/{14.0.0 → 17}/include/unwind.h +10 -6
  112. package/lib/clang/17/include/velintrin.h +71 -0
  113. package/lib/clang/17/include/velintrin_approx.h +120 -0
  114. package/lib/clang/17/include/velintrin_gen.h +1257 -0
  115. package/lib/clang/{14.0.0 → 17}/include/wasm_simd128.h +134 -14
  116. package/lib/clang/17/include/x86gprintrin.h +65 -0
  117. package/lib/clang/{14.0.0 → 17}/include/x86intrin.h +4 -0
  118. package/lib/clang/{14.0.0 → 17}/include/xmmintrin.h +10 -5
  119. package/lib/clang/17/include/xsavecintrin.h +84 -0
  120. package/package.json +6 -6
  121. package/lib/clang/14.0.0/include/adxintrin.h +0 -72
  122. package/lib/clang/14.0.0/include/avx2intrin.h +0 -1148
  123. package/lib/clang/14.0.0/include/bmi2intrin.h +0 -81
  124. package/lib/clang/14.0.0/include/fmaintrin.h +0 -216
  125. package/lib/clang/14.0.0/include/mwaitxintrin.h +0 -33
  126. package/lib/clang/14.0.0/include/ppc_wrappers/emmintrin.h +0 -2325
  127. package/lib/clang/14.0.0/include/ppc_wrappers/pmmintrin.h +0 -151
  128. package/lib/clang/14.0.0/include/ppc_wrappers/smmintrin.h +0 -110
  129. package/lib/clang/14.0.0/include/ppc_wrappers/tmmintrin.h +0 -496
  130. package/lib/clang/14.0.0/include/ppc_wrappers/xmmintrin.h +0 -1844
  131. package/lib/clang/14.0.0/include/rdseedintrin.h +0 -42
  132. package/lib/clang/14.0.0/include/riscv_vector.h +0 -95423
  133. package/lib/clang/14.0.0/include/shaintrin.h +0 -61
  134. package/lib/clang/14.0.0/include/x86gprintrin.h +0 -35
  135. package/lib/clang/14.0.0/include/xsavecintrin.h +0 -34
  136. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_builtin_vars.h +0 -0
  137. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_cmath.h +0 -0
  138. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_complex_builtins.h +0 -0
  139. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_device_functions.h +0 -0
  140. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_libdevice_declares.h +0 -0
  141. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_math_forward_declares.h +0 -0
  142. /package/lib/clang/{14.0.0 → 17}/include/__clang_cuda_runtime_wrapper.h +0 -0
  143. /package/lib/clang/{14.0.0 → 17}/include/__stddef_max_align_t.h +0 -0
  144. /package/lib/clang/{14.0.0 → 17}/include/__wmmintrin_aes.h +0 -0
  145. /package/lib/clang/{14.0.0 → 17}/include/ammintrin.h +0 -0
  146. /package/lib/clang/{14.0.0 → 17}/include/arm64intr.h +0 -0
  147. /package/lib/clang/{14.0.0 → 17}/include/arm_bf16.h +0 -0
  148. /package/lib/clang/{14.0.0 → 17}/include/arm_cde.h +0 -0
  149. /package/lib/clang/{14.0.0 → 17}/include/arm_cmse.h +0 -0
  150. /package/lib/clang/{14.0.0 → 17}/include/arm_mve.h +0 -0
  151. /package/lib/clang/{14.0.0 → 17}/include/armintr.h +0 -0
  152. /package/lib/clang/{14.0.0 → 17}/include/avx512bitalgintrin.h +0 -0
  153. /package/lib/clang/{14.0.0 → 17}/include/avx512cdintrin.h +0 -0
  154. /package/lib/clang/{14.0.0 → 17}/include/avx512dqintrin.h +0 -0
  155. /package/lib/clang/{14.0.0 → 17}/include/avx512erintrin.h +0 -0
  156. /package/lib/clang/{14.0.0 → 17}/include/avx512ifmaintrin.h +0 -0
  157. /package/lib/clang/{14.0.0 → 17}/include/avx512pfintrin.h +0 -0
  158. /package/lib/clang/{14.0.0 → 17}/include/avx512vbmi2intrin.h +0 -0
  159. /package/lib/clang/{14.0.0 → 17}/include/avx512vbmiintrin.h +0 -0
  160. /package/lib/clang/{14.0.0 → 17}/include/avx512vbmivlintrin.h +0 -0
  161. /package/lib/clang/{14.0.0 → 17}/include/avx512vlbitalgintrin.h +0 -0
  162. /package/lib/clang/{14.0.0 → 17}/include/avx512vlcdintrin.h +0 -0
  163. /package/lib/clang/{14.0.0 → 17}/include/avx512vldqintrin.h +0 -0
  164. /package/lib/clang/{14.0.0 → 17}/include/avx512vlvbmi2intrin.h +0 -0
  165. /package/lib/clang/{14.0.0 → 17}/include/avx512vlvp2intersectintrin.h +0 -0
  166. /package/lib/clang/{14.0.0 → 17}/include/avx512vnniintrin.h +0 -0
  167. /package/lib/clang/{14.0.0 → 17}/include/avx512vp2intersectintrin.h +0 -0
  168. /package/lib/clang/{14.0.0 → 17}/include/avx512vpopcntdqintrin.h +0 -0
  169. /package/lib/clang/{14.0.0 → 17}/include/avx512vpopcntdqvlintrin.h +0 -0
  170. /package/lib/clang/{14.0.0 → 17}/include/builtins.h +0 -0
  171. /package/lib/clang/{14.0.0 → 17}/include/cet.h +0 -0
  172. /package/lib/clang/{14.0.0 → 17}/include/cldemoteintrin.h +0 -0
  173. /package/lib/clang/{14.0.0 → 17}/include/clwbintrin.h +0 -0
  174. /package/lib/clang/{14.0.0 → 17}/include/crc32intrin.h +0 -0
  175. /package/lib/clang/{14.0.0 → 17}/include/cuda_wrappers/algorithm +0 -0
  176. /package/lib/clang/{14.0.0 → 17}/include/cuda_wrappers/complex +0 -0
  177. /package/lib/clang/{14.0.0 → 17}/include/cuda_wrappers/new +0 -0
  178. /package/lib/clang/{14.0.0 → 17}/include/enqcmdintrin.h +0 -0
  179. /package/lib/clang/{14.0.0 → 17}/include/fma4intrin.h +0 -0
  180. /package/lib/clang/{14.0.0 → 17}/include/fxsrintrin.h +0 -0
  181. /package/lib/clang/{14.0.0 → 17}/include/hexagon_circ_brev_intrinsics.h +0 -0
  182. /package/lib/clang/{14.0.0 → 17}/include/hexagon_protos.h +0 -0
  183. /package/lib/clang/{14.0.0 → 17}/include/hexagon_types.h +0 -0
  184. /package/lib/clang/{14.0.0 → 17}/include/htmintrin.h +0 -0
  185. /package/lib/clang/{14.0.0 → 17}/include/htmxlintrin.h +0 -0
  186. /package/lib/clang/{14.0.0 → 17}/include/hvx_hexagon_protos.h +0 -0
  187. /package/lib/clang/{14.0.0 → 17}/include/inttypes.h +0 -0
  188. /package/lib/clang/{14.0.0 → 17}/include/invpcidintrin.h +0 -0
  189. /package/lib/clang/{14.0.0 → 17}/include/iso646.h +0 -0
  190. /package/lib/clang/{14.0.0 → 17}/include/lwpintrin.h +0 -0
  191. /package/lib/clang/{14.0.0 → 17}/include/lzcntintrin.h +0 -0
  192. /package/lib/clang/{14.0.0 → 17}/include/mm3dnow.h +0 -0
  193. /package/lib/clang/{14.0.0 → 17}/include/mmintrin.h +0 -0
  194. /package/lib/clang/{14.0.0 → 17}/include/module.modulemap +0 -0
  195. /package/lib/clang/{14.0.0 → 17}/include/movdirintrin.h +0 -0
  196. /package/lib/clang/{14.0.0 → 17}/include/msa.h +0 -0
  197. /package/lib/clang/{14.0.0 → 17}/include/nmmintrin.h +0 -0
  198. /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/cmath +0 -0
  199. /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/complex +0 -0
  200. /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/complex.h +0 -0
  201. /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/complex_cmath.h +0 -0
  202. /package/lib/clang/{14.0.0 → 17}/include/openmp_wrappers/math.h +0 -0
  203. /package/lib/clang/{14.0.0 → 17}/include/pconfigintrin.h +0 -0
  204. /package/lib/clang/{14.0.0 → 17}/include/pkuintrin.h +0 -0
  205. /package/lib/clang/{14.0.0 → 17}/include/popcntintrin.h +0 -0
  206. /package/lib/clang/{14.0.0 → 17}/include/prfchwintrin.h +0 -0
  207. /package/lib/clang/{14.0.0 → 17}/include/ptwriteintrin.h +0 -0
  208. /package/lib/clang/{14.0.0 → 17}/include/s390intrin.h +0 -0
  209. /package/lib/clang/{14.0.0 → 17}/include/serializeintrin.h +0 -0
  210. /package/lib/clang/{14.0.0 → 17}/include/sgxintrin.h +0 -0
  211. /package/lib/clang/{14.0.0 → 17}/include/tbmintrin.h +0 -0
  212. /package/lib/clang/{14.0.0 → 17}/include/tgmath.h +0 -0
  213. /package/lib/clang/{14.0.0 → 17}/include/tmmintrin.h +0 -0
  214. /package/lib/clang/{14.0.0 → 17}/include/tsxldtrkintrin.h +0 -0
  215. /package/lib/clang/{14.0.0 → 17}/include/vadefs.h +0 -0
  216. /package/lib/clang/{14.0.0 → 17}/include/vaesintrin.h +0 -0
  217. /package/lib/clang/{14.0.0 → 17}/include/varargs.h +0 -0
  218. /package/lib/clang/{14.0.0 → 17}/include/vecintrin.h +0 -0
  219. /package/lib/clang/{14.0.0 → 17}/include/vpclmulqdqintrin.h +0 -0
  220. /package/lib/clang/{14.0.0 → 17}/include/waitpkgintrin.h +0 -0
  221. /package/lib/clang/{14.0.0 → 17}/include/wbnoinvdintrin.h +0 -0
  222. /package/lib/clang/{14.0.0 → 17}/include/wmmintrin.h +0 -0
  223. /package/lib/clang/{14.0.0 → 17}/include/xopintrin.h +0 -0
  224. /package/lib/clang/{14.0.0 → 17}/include/xsaveintrin.h +0 -0
  225. /package/lib/clang/{14.0.0 → 17}/include/xsaveoptintrin.h +0 -0
  226. /package/lib/clang/{14.0.0 → 17}/include/xsavesintrin.h +0 -0
  227. /package/lib/clang/{14.0.0 → 17}/include/xtestintrin.h +0 -0
@@ -0,0 +1,234 @@
1
+ /*===------------ larchintrin.h - LoongArch 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
+
10
+ #ifndef _LOONGARCH_BASE_INTRIN_H
11
+ #define _LOONGARCH_BASE_INTRIN_H
12
+
13
+ #ifdef __cplusplus
14
+ extern "C" {
15
+ #endif
16
+
17
+ typedef struct rdtime {
18
+ unsigned int value;
19
+ unsigned int timeid;
20
+ } __rdtime_t;
21
+
22
+ #if __loongarch_grlen == 64
23
+ typedef struct drdtime {
24
+ unsigned long dvalue;
25
+ unsigned long dtimeid;
26
+ } __drdtime_t;
27
+
28
+ extern __inline __drdtime_t
29
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
30
+ __rdtime_d(void) {
31
+ __drdtime_t __drdtime;
32
+ __asm__ volatile(
33
+ "rdtime.d %[val], %[tid]\n\t"
34
+ : [val] "=&r"(__drdtime.dvalue), [tid] "=&r"(__drdtime.dtimeid));
35
+ return __drdtime;
36
+ }
37
+ #endif
38
+
39
+ extern __inline __rdtime_t
40
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
41
+ __rdtimeh_w(void) {
42
+ __rdtime_t __rdtime;
43
+ __asm__ volatile("rdtimeh.w %[val], %[tid]\n\t"
44
+ : [val] "=&r"(__rdtime.value), [tid] "=&r"(__rdtime.timeid));
45
+ return __rdtime;
46
+ }
47
+
48
+ extern __inline __rdtime_t
49
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
50
+ __rdtimel_w(void) {
51
+ __rdtime_t __rdtime;
52
+ __asm__ volatile("rdtimel.w %[val], %[tid]\n\t"
53
+ : [val] "=&r"(__rdtime.value), [tid] "=&r"(__rdtime.timeid));
54
+ return __rdtime;
55
+ }
56
+
57
+ #if __loongarch_grlen == 64
58
+ extern __inline int
59
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
60
+ __crc_w_b_w(char _1, int _2) {
61
+ return (int)__builtin_loongarch_crc_w_b_w((char)_1, (int)_2);
62
+ }
63
+
64
+ extern __inline int
65
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
66
+ __crc_w_h_w(short _1, int _2) {
67
+ return (int)__builtin_loongarch_crc_w_h_w((short)_1, (int)_2);
68
+ }
69
+
70
+ extern __inline int
71
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
72
+ __crc_w_w_w(int _1, int _2) {
73
+ return (int)__builtin_loongarch_crc_w_w_w((int)_1, (int)_2);
74
+ }
75
+
76
+ extern __inline int
77
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
78
+ __crc_w_d_w(long int _1, int _2) {
79
+ return (int)__builtin_loongarch_crc_w_d_w((long int)_1, (int)_2);
80
+ }
81
+
82
+ extern __inline int
83
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
84
+ __crcc_w_b_w(char _1, int _2) {
85
+ return (int)__builtin_loongarch_crcc_w_b_w((char)_1, (int)_2);
86
+ }
87
+
88
+ extern __inline int
89
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
90
+ __crcc_w_h_w(short _1, int _2) {
91
+ return (int)__builtin_loongarch_crcc_w_h_w((short)_1, (int)_2);
92
+ }
93
+
94
+ extern __inline int
95
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
96
+ __crcc_w_w_w(int _1, int _2) {
97
+ return (int)__builtin_loongarch_crcc_w_w_w((int)_1, (int)_2);
98
+ }
99
+
100
+ extern __inline int
101
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
102
+ __crcc_w_d_w(long int _1, int _2) {
103
+ return (int)__builtin_loongarch_crcc_w_d_w((long int)_1, (int)_2);
104
+ }
105
+ #endif
106
+
107
+ #define __break(/*ui15*/ _1) __builtin_loongarch_break((_1))
108
+
109
+ #if __loongarch_grlen == 32
110
+ #define __cacop_w(/*uimm5*/ _1, /*unsigned int*/ _2, /*simm12*/ _3) \
111
+ ((void)__builtin_loongarch_cacop_w((_1), (unsigned int)(_2), (_3)))
112
+ #endif
113
+
114
+ #if __loongarch_grlen == 64
115
+ #define __cacop_d(/*uimm5*/ _1, /*unsigned long int*/ _2, /*simm12*/ _3) \
116
+ ((void)__builtin_loongarch_cacop_d((_1), (unsigned long int)(_2), (_3)))
117
+ #endif
118
+
119
+ #define __dbar(/*ui15*/ _1) __builtin_loongarch_dbar((_1))
120
+
121
+ #define __ibar(/*ui15*/ _1) __builtin_loongarch_ibar((_1))
122
+
123
+ #define __movfcsr2gr(/*ui5*/ _1) __builtin_loongarch_movfcsr2gr((_1));
124
+
125
+ #define __movgr2fcsr(/*ui5*/ _1, _2) \
126
+ __builtin_loongarch_movgr2fcsr((_1), (unsigned int)_2);
127
+
128
+ #define __syscall(/*ui15*/ _1) __builtin_loongarch_syscall((_1))
129
+
130
+ #define __csrrd_w(/*ui14*/ _1) ((unsigned int)__builtin_loongarch_csrrd_w((_1)))
131
+
132
+ #define __csrwr_w(/*unsigned int*/ _1, /*ui14*/ _2) \
133
+ ((unsigned int)__builtin_loongarch_csrwr_w((unsigned int)(_1), (_2)))
134
+
135
+ #define __csrxchg_w(/*unsigned int*/ _1, /*unsigned int*/ _2, /*ui14*/ _3) \
136
+ ((unsigned int)__builtin_loongarch_csrxchg_w((unsigned int)(_1), \
137
+ (unsigned int)(_2), (_3)))
138
+
139
+ #if __loongarch_grlen == 64
140
+ #define __csrrd_d(/*ui14*/ _1) \
141
+ ((unsigned long int)__builtin_loongarch_csrrd_d((_1)))
142
+
143
+ #define __csrwr_d(/*unsigned long int*/ _1, /*ui14*/ _2) \
144
+ ((unsigned long int)__builtin_loongarch_csrwr_d((unsigned long int)(_1), \
145
+ (_2)))
146
+
147
+ #define __csrxchg_d(/*unsigned long int*/ _1, /*unsigned long int*/ _2, \
148
+ /*ui14*/ _3) \
149
+ ((unsigned long int)__builtin_loongarch_csrxchg_d( \
150
+ (unsigned long int)(_1), (unsigned long int)(_2), (_3)))
151
+ #endif
152
+
153
+ extern __inline unsigned char
154
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
155
+ __iocsrrd_b(unsigned int _1) {
156
+ return (unsigned char)__builtin_loongarch_iocsrrd_b((unsigned int)_1);
157
+ }
158
+
159
+ extern __inline unsigned char
160
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
161
+ __iocsrrd_h(unsigned int _1) {
162
+ return (unsigned short)__builtin_loongarch_iocsrrd_h((unsigned int)_1);
163
+ }
164
+
165
+ extern __inline unsigned int
166
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
167
+ __iocsrrd_w(unsigned int _1) {
168
+ return (unsigned int)__builtin_loongarch_iocsrrd_w((unsigned int)_1);
169
+ }
170
+
171
+ #if __loongarch_grlen == 64
172
+ extern __inline unsigned long int
173
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
174
+ __iocsrrd_d(unsigned int _1) {
175
+ return (unsigned long int)__builtin_loongarch_iocsrrd_d((unsigned int)_1);
176
+ }
177
+ #endif
178
+
179
+ extern __inline void
180
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
181
+ __iocsrwr_b(unsigned char _1, unsigned int _2) {
182
+ __builtin_loongarch_iocsrwr_b((unsigned char)_1, (unsigned int)_2);
183
+ }
184
+
185
+ extern __inline void
186
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
187
+ __iocsrwr_h(unsigned short _1, unsigned int _2) {
188
+ __builtin_loongarch_iocsrwr_h((unsigned short)_1, (unsigned int)_2);
189
+ }
190
+
191
+ extern __inline void
192
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
193
+ __iocsrwr_w(unsigned int _1, unsigned int _2) {
194
+ __builtin_loongarch_iocsrwr_w((unsigned int)_1, (unsigned int)_2);
195
+ }
196
+
197
+ extern __inline unsigned int
198
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
199
+ __cpucfg(unsigned int _1) {
200
+ return (unsigned int)__builtin_loongarch_cpucfg((unsigned int)_1);
201
+ }
202
+
203
+ #if __loongarch_grlen == 64
204
+ extern __inline void
205
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
206
+ __iocsrwr_d(unsigned long int _1, unsigned int _2) {
207
+ __builtin_loongarch_iocsrwr_d((unsigned long int)_1, (unsigned int)_2);
208
+ }
209
+
210
+ extern __inline void
211
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
212
+ __asrtgt_d(long int _1, long int _2) {
213
+ __builtin_loongarch_asrtgt_d((long int)_1, (long int)_2);
214
+ }
215
+
216
+ extern __inline void
217
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
218
+ __asrtle_d(long int _1, long int _2) {
219
+ __builtin_loongarch_asrtle_d((long int)_1, (long int)_2);
220
+ }
221
+ #endif
222
+
223
+ #if __loongarch_grlen == 64
224
+ #define __lddir_d(/*long int*/ _1, /*ui5*/ _2) \
225
+ ((long int)__builtin_loongarch_lddir_d((long int)(_1), (_2)))
226
+
227
+ #define __ldpte_d(/*long int*/ _1, /*ui5*/ _2) \
228
+ ((void)__builtin_loongarch_ldpte_d((long int)(_1), (_2)))
229
+ #endif
230
+
231
+ #ifdef __cplusplus
232
+ }
233
+ #endif
234
+ #endif /* _LOONGARCH_BASE_INTRIN_H */
@@ -52,7 +52,11 @@
52
52
  #define LONG_MIN (-__LONG_MAX__ -1L)
53
53
 
54
54
  #define UCHAR_MAX (__SCHAR_MAX__*2 +1)
55
- #define USHRT_MAX (__SHRT_MAX__ *2 +1)
55
+ #if __SHRT_WIDTH__ < __INT_WIDTH__
56
+ #define USHRT_MAX (__SHRT_MAX__ * 2 + 1)
57
+ #else
58
+ #define USHRT_MAX (__SHRT_MAX__ * 2U + 1U)
59
+ #endif
56
60
  #define UINT_MAX (__INT_MAX__ *2U +1U)
57
61
  #define ULONG_MAX (__LONG_MAX__ *2UL+1UL)
58
62
 
@@ -65,7 +69,7 @@
65
69
  /* C2x 5.2.4.2.1 */
66
70
  /* FIXME: This is using the placeholder dates Clang produces for these macros
67
71
  in C2x mode; switch to the correct values once they've been published. */
68
- #if __STDC_VERSION__ >= 202000L
72
+ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
69
73
  #define BOOL_WIDTH __BOOL_WIDTH__
70
74
  #define CHAR_WIDTH CHAR_BIT
71
75
  #define SCHAR_WIDTH CHAR_BIT
@@ -93,7 +97,8 @@
93
97
  /* C99 5.2.4.2.1: Added long long.
94
98
  C++11 18.3.3.2: same contents as the Standard C Library header <limits.h>.
95
99
  */
96
- #if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
100
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
101
+ (defined(__cplusplus) && __cplusplus >= 201103L)
97
102
 
98
103
  #undef LLONG_MIN
99
104
  #undef LLONG_MAX
@@ -0,0 +1,85 @@
1
+ //===-- Wrapper for C standard ctype.h declarations on the GPU ------------===//
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 __CLANG_LLVM_LIBC_WRAPPERS_CTYPE_H__
10
+ #define __CLANG_LLVM_LIBC_WRAPPERS_CTYPE_H__
11
+
12
+ #if !defined(_OPENMP) && !defined(__HIP__) && !defined(__CUDA__)
13
+ #error "This file is for GPU offloading compilation only"
14
+ #endif
15
+
16
+ #include_next <ctype.h>
17
+
18
+ #if __has_include(<llvm-libc-decls/ctype.h>)
19
+
20
+ #if defined(__HIP__) || defined(__CUDA__)
21
+ #define __LIBC_ATTRS __attribute__((device))
22
+ #endif
23
+
24
+ // The GNU headers like to provide these as macros, we need to undefine them so
25
+ // they do not conflict with the following definitions for the GPU.
26
+
27
+ #pragma push_macro("isalnum")
28
+ #pragma push_macro("isalpha")
29
+ #pragma push_macro("isblank")
30
+ #pragma push_macro("iscntrl")
31
+ #pragma push_macro("isdigit")
32
+ #pragma push_macro("isgraph")
33
+ #pragma push_macro("islower")
34
+ #pragma push_macro("isprint")
35
+ #pragma push_macro("ispunct")
36
+ #pragma push_macro("isspace")
37
+ #pragma push_macro("isupper")
38
+ #pragma push_macro("isxdigit")
39
+ #pragma push_macro("tolower")
40
+ #pragma push_macro("toupper")
41
+
42
+ #undef isalnum
43
+ #undef isalpha
44
+ #undef iscntrl
45
+ #undef isdigit
46
+ #undef islower
47
+ #undef isgraph
48
+ #undef isprint
49
+ #undef ispunct
50
+ #undef isspace
51
+ #undef isupper
52
+ #undef isblank
53
+ #undef isxdigit
54
+ #undef tolower
55
+ #undef toupper
56
+
57
+ #pragma omp begin declare target
58
+
59
+ #include <llvm-libc-decls/ctype.h>
60
+
61
+ #pragma omp end declare target
62
+
63
+ // Restore the original macros when compiling on the host.
64
+ #if !defined(__NVPTX__) && !defined(__AMDGPU__)
65
+ #pragma pop_macro("isalnum")
66
+ #pragma pop_macro("isalpha")
67
+ #pragma pop_macro("isblank")
68
+ #pragma pop_macro("iscntrl")
69
+ #pragma pop_macro("isdigit")
70
+ #pragma pop_macro("isgraph")
71
+ #pragma pop_macro("islower")
72
+ #pragma pop_macro("isprint")
73
+ #pragma pop_macro("ispunct")
74
+ #pragma pop_macro("isspace")
75
+ #pragma pop_macro("isupper")
76
+ #pragma pop_macro("isxdigit")
77
+ #pragma pop_macro("tolower")
78
+ #pragma pop_macro("toupper")
79
+ #endif
80
+
81
+ #undef __LIBC_ATTRS
82
+
83
+ #endif
84
+
85
+ #endif // __CLANG_LLVM_LIBC_WRAPPERS_CTYPE_H__
@@ -0,0 +1,34 @@
1
+ //===-- Wrapper for C standard inttypes.h declarations on the GPU ---------===//
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 __CLANG_LLVM_LIBC_WRAPPERS_INTTYPES_H__
10
+ #define __CLANG_LLVM_LIBC_WRAPPERS_INTTYPES_H__
11
+
12
+ #if !defined(_OPENMP) && !defined(__HIP__) && !defined(__CUDA__)
13
+ #error "This file is for GPU offloading compilation only"
14
+ #endif
15
+
16
+ #include_next <inttypes.h>
17
+
18
+ #if __has_include(<llvm-libc-decls/inttypes.h>)
19
+
20
+ #if defined(__HIP__) || defined(__CUDA__)
21
+ #define __LIBC_ATTRS __attribute__((device))
22
+ #endif
23
+
24
+ #pragma omp begin declare target
25
+
26
+ #include <llvm-libc-decls/inttypes.h>
27
+
28
+ #pragma omp end declare target
29
+
30
+ #undef __LIBC_ATTRS
31
+
32
+ #endif
33
+
34
+ #endif // __CLANG_LLVM_LIBC_WRAPPERS_INTTYPES_H__
@@ -0,0 +1,34 @@
1
+ //===-- Wrapper for C standard stdio.h declarations on the GPU ------------===//
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 __CLANG_LLVM_LIBC_WRAPPERS_STDIO_H__
10
+ #define __CLANG_LLVM_LIBC_WRAPPERS_STDIO_H__
11
+
12
+ #if !defined(_OPENMP) && !defined(__HIP__) && !defined(__CUDA__)
13
+ #error "This file is for GPU offloading compilation only"
14
+ #endif
15
+
16
+ #include_next <stdio.h>
17
+
18
+ #if __has_include(<llvm-libc-decls/stdio.h>)
19
+
20
+ #if defined(__HIP__) || defined(__CUDA__)
21
+ #define __LIBC_ATTRS __attribute__((device))
22
+ #endif
23
+
24
+ #pragma omp begin declare target
25
+
26
+ #include <llvm-libc-decls/stdio.h>
27
+
28
+ #pragma omp end declare target
29
+
30
+ #undef __LIBC_ATTRS
31
+
32
+ #endif
33
+
34
+ #endif // __CLANG_LLVM_LIBC_WRAPPERS_STDIO_H__
@@ -0,0 +1,42 @@
1
+ //===-- Wrapper for C standard stdlib.h declarations on the GPU -----------===//
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 __CLANG_LLVM_LIBC_WRAPPERS_STDLIB_H__
10
+ #define __CLANG_LLVM_LIBC_WRAPPERS_STDLIB_H__
11
+
12
+ #if !defined(_OPENMP) && !defined(__HIP__) && !defined(__CUDA__)
13
+ #error "This file is for GPU offloading compilation only"
14
+ #endif
15
+
16
+ #include_next <stdlib.h>
17
+
18
+ #if __has_include(<llvm-libc-decls/stdlib.h>)
19
+
20
+ #if defined(__HIP__) || defined(__CUDA__)
21
+ #define __LIBC_ATTRS __attribute__((device))
22
+ #endif
23
+
24
+ #pragma omp begin declare target
25
+
26
+ // The LLVM C library uses this type so we forward declare it.
27
+ typedef void (*__atexithandler_t)(void);
28
+
29
+ // Enforce ABI compatibility with the structs used by the LLVM C library.
30
+ _Static_assert(__builtin_offsetof(div_t, quot) == 0, "ABI mismatch!");
31
+ _Static_assert(__builtin_offsetof(ldiv_t, quot) == 0, "ABI mismatch!");
32
+ _Static_assert(__builtin_offsetof(lldiv_t, quot) == 0, "ABI mismatch!");
33
+
34
+ #include <llvm-libc-decls/stdlib.h>
35
+
36
+ #pragma omp end declare target
37
+
38
+ #undef __LIBC_ATTRS
39
+
40
+ #endif
41
+
42
+ #endif // __CLANG_LLVM_LIBC_WRAPPERS_STDLIB_H__
@@ -0,0 +1,37 @@
1
+ //===-- Wrapper for C standard string.h declarations on the GPU -----------===//
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 __CLANG_LLVM_LIBC_WRAPPERS_STRING_H__
10
+ #define __CLANG_LLVM_LIBC_WRAPPERS_STRING_H__
11
+
12
+ #if !defined(_OPENMP) && !defined(__HIP__) && !defined(__CUDA__)
13
+ #error "This file is for GPU offloading compilation only"
14
+ #endif
15
+
16
+ // FIXME: The GNU headers provide C++ standard compliant headers when in C++
17
+ // mode and the LLVM libc does not. We cannot enable memchr, strchr, strchrnul,
18
+ // strpbrk, strrchr, strstr, or strcasestr until this is addressed.
19
+ #include_next <string.h>
20
+
21
+ #if __has_include(<llvm-libc-decls/string.h>)
22
+
23
+ #if defined(__HIP__) || defined(__CUDA__)
24
+ #define __LIBC_ATTRS __attribute__((device))
25
+ #endif
26
+
27
+ #pragma omp begin declare target
28
+
29
+ #include <llvm-libc-decls/string.h>
30
+
31
+ #pragma omp end declare target
32
+
33
+ #undef __LIBC_ATTRS
34
+
35
+ #endif
36
+
37
+ #endif // __CLANG_LLVM_LIBC_WRAPPERS_STRING_H__
@@ -28,9 +28,9 @@ extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t __size
28
28
 
29
29
  #if !(defined(_WIN32) && defined(_mm_malloc))
30
30
  static __inline__ void *__attribute__((__always_inline__, __nodebug__,
31
- __malloc__))
32
- _mm_malloc(size_t __size, size_t __align)
33
- {
31
+ __malloc__, __alloc_size__(1),
32
+ __alloc_align__(2)))
33
+ _mm_malloc(size_t __size, size_t __align) {
34
34
  if (__align == 1) {
35
35
  return malloc(__size);
36
36
  }
@@ -0,0 +1,62 @@
1
+ /*===---- mwaitxintrin.h - MONITORX/MWAITX 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
+
10
+ #ifndef __X86INTRIN_H
11
+ #error "Never use <mwaitxintrin.h> directly; include <x86intrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __MWAITXINTRIN_H
15
+ #define __MWAITXINTRIN_H
16
+
17
+ /* Define the default attributes for the functions in this file. */
18
+ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("mwaitx")))
19
+
20
+ /// Establishes a linear address memory range to be monitored and puts
21
+ /// the processor in the monitor event pending state. Data stored in the
22
+ /// monitored address range causes the processor to exit the pending state.
23
+ ///
24
+ /// \headerfile <x86intrin.h>
25
+ ///
26
+ /// This intrinsic corresponds to the \c MONITORX instruction.
27
+ ///
28
+ /// \param __p
29
+ /// The memory range to be monitored. The size of the range is determined by
30
+ /// CPUID function 0000_0005h.
31
+ /// \param __extensions
32
+ /// Optional extensions for the monitoring state.
33
+ /// \param __hints
34
+ /// Optional hints for the monitoring state.
35
+ static __inline__ void __DEFAULT_FN_ATTRS
36
+ _mm_monitorx(void * __p, unsigned __extensions, unsigned __hints)
37
+ {
38
+ __builtin_ia32_monitorx(__p, __extensions, __hints);
39
+ }
40
+
41
+ /// Used with the \c MONITORX instruction to wait while the processor is in
42
+ /// the monitor event pending state. Data stored in the monitored address
43
+ /// range, or an interrupt, causes the processor to exit the pending state.
44
+ ///
45
+ /// \headerfile <x86intrin.h>
46
+ ///
47
+ /// This intrinsic corresponds to the \c MWAITX instruction.
48
+ ///
49
+ /// \param __extensions
50
+ /// Optional extensions for the monitoring state, which can vary by
51
+ /// processor.
52
+ /// \param __hints
53
+ /// Optional hints for the monitoring state, which can vary by processor.
54
+ static __inline__ void __DEFAULT_FN_ATTRS
55
+ _mm_mwaitx(unsigned __extensions, unsigned __hints, unsigned __clock)
56
+ {
57
+ __builtin_ia32_mwaitx(__extensions, __hints, __clock);
58
+ }
59
+
60
+ #undef __DEFAULT_FN_ATTRS
61
+
62
+ #endif /* __MWAITXINTRIN_H */
@@ -21,6 +21,7 @@
21
21
  #define cl_khr_subgroup_shuffle 1
22
22
  #define cl_khr_subgroup_shuffle_relative 1
23
23
  #define cl_khr_subgroup_clustered_reduce 1
24
+ #define cl_khr_subgroup_rotate 1
24
25
  #define cl_khr_extended_bit_ops 1
25
26
  #define cl_khr_integer_dot_product 1
26
27
  #define __opencl_c_integer_dot_product_input_4x8bit 1
@@ -67,11 +68,31 @@
67
68
  #if (__OPENCL_CPP_VERSION__ == 202100 || __OPENCL_C_VERSION__ == 300)
68
69
  // For the SPIR and SPIR-V target all features are supported.
69
70
  #if defined(__SPIR__) || defined(__SPIRV__)
71
+ #define __opencl_c_work_group_collective_functions 1
70
72
  #define __opencl_c_atomic_order_seq_cst 1
71
73
  #define __opencl_c_atomic_scope_device 1
72
74
  #define __opencl_c_atomic_scope_all_devices 1
73
75
  #define __opencl_c_read_write_images 1
74
76
  #endif // defined(__SPIR__)
77
+
78
+ // Undefine any feature macros that have been explicitly disabled using
79
+ // an __undef_<feature> macro.
80
+ #ifdef __undef___opencl_c_work_group_collective_functions
81
+ #undef __opencl_c_work_group_collective_functions
82
+ #endif
83
+ #ifdef __undef___opencl_c_atomic_order_seq_cst
84
+ #undef __opencl_c_atomic_order_seq_cst
85
+ #endif
86
+ #ifdef __undef___opencl_c_atomic_scope_device
87
+ #undef __opencl_c_atomic_scope_device
88
+ #endif
89
+ #ifdef __undef___opencl_c_atomic_scope_all_devices
90
+ #undef __opencl_c_atomic_scope_all_devices
91
+ #endif
92
+ #ifdef __undef___opencl_c_read_write_images
93
+ #undef __opencl_c_read_write_images
94
+ #endif
95
+
75
96
  #endif // (__OPENCL_CPP_VERSION__ == 202100 || __OPENCL_C_VERSION__ == 300)
76
97
 
77
98
  #if !defined(__opencl_c_generic_address_space)
@@ -80,6 +101,11 @@
80
101
  #define __opencl_c_named_address_space_builtins 1
81
102
  #endif // !defined(__opencl_c_generic_address_space)
82
103
 
104
+ #if defined(cl_intel_subgroups) || defined(cl_khr_subgroups) || defined(__opencl_c_subgroups)
105
+ // Internal feature macro to provide subgroup builtins.
106
+ #define __opencl_subgroup_builtins 1
107
+ #endif
108
+
83
109
  // built-in scalar data types:
84
110
 
85
111
  /**
@@ -197,6 +223,9 @@ typedef double double8 __attribute__((ext_vector_type(8)));
197
223
  typedef double double16 __attribute__((ext_vector_type(16)));
198
224
  #endif
199
225
 
226
+ // An internal alias for half, for use by OpenCLBuiltins.td.
227
+ #define __half half
228
+
200
229
  #if defined(__OPENCL_CPP_VERSION__)
201
230
  #define NULL nullptr
202
231
  #elif defined(__OPENCL_C_VERSION__)
@@ -445,6 +474,9 @@ typedef enum memory_order
445
474
  #define CLK_HALF_FLOAT 0x10DD
446
475
  #define CLK_FLOAT 0x10DE
447
476
  #define CLK_UNORM_INT24 0x10DF
477
+ #if __OPENCL_C_VERSION__ >= CL_VERSION_3_0
478
+ #define CLK_UNORM_INT_101010_2 0x10E0
479
+ #endif // __OPENCL_C_VERSION__ >= CL_VERSION_3_0
448
480
 
449
481
  // Channel order, numbering must be aligned with cl_channel_order in cl.h
450
482
  //