@cpp-linter/clang-tidy-win32-x64 19.1.0 → 23.1.3

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 (320) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy.exe +2 -2
  3. package/lib/clang/23/include/__clang_cuda_complex_builtins.h +236 -0
  4. package/lib/clang/{19 → 23}/include/__clang_cuda_device_functions.h +15 -1
  5. package/lib/clang/{19 → 23}/include/__clang_cuda_intrinsics.h +288 -20
  6. package/lib/clang/{19 → 23}/include/__clang_cuda_math.h +5 -0
  7. package/lib/clang/{19 → 23}/include/__clang_cuda_math_forward_declares.h +5 -0
  8. package/lib/clang/{19 → 23}/include/__clang_cuda_runtime_wrapper.h +28 -5
  9. package/lib/clang/{19 → 23}/include/__clang_cuda_texture_intrinsics.h +437 -2
  10. package/lib/clang/23/include/__clang_gpu_builtin_vars.h +71 -0
  11. package/lib/clang/23/include/__clang_gpu_device_functions.h +411 -0
  12. package/lib/clang/23/include/__clang_gpu_intrinsics.h +242 -0
  13. package/lib/clang/{19 → 23}/include/__clang_hip_cmath.h +15 -9
  14. package/lib/clang/{19 → 23}/include/__clang_hip_libdevice_declares.h +24 -139
  15. package/lib/clang/{19 → 23}/include/__clang_hip_math.h +115 -34
  16. package/lib/clang/{19 → 23}/include/__clang_hip_runtime_wrapper.h +12 -1
  17. package/lib/clang/23/include/__clang_spirv_builtins.h +217 -0
  18. package/lib/clang/23/include/__clang_spirv_libdevice_declares.h +170 -0
  19. package/lib/clang/23/include/__clang_spirv_math.h +719 -0
  20. package/lib/clang/{19/include/float.h → 23/include/__float_float.h} +14 -34
  21. package/lib/clang/23/include/__float_header_macro.h +12 -0
  22. package/lib/clang/23/include/__float_infinity_nan.h +20 -0
  23. package/lib/clang/{19 → 23}/include/__stdarg_va_arg.h +2 -2
  24. package/lib/clang/{19 → 23}/include/adcintrin.h +5 -0
  25. package/lib/clang/{19 → 23}/include/adxintrin.h +5 -0
  26. package/lib/clang/{19 → 23}/include/altivec.h +169 -96
  27. package/lib/clang/23/include/amdgpuintrin.h +164 -0
  28. package/lib/clang/23/include/amdhsa_abi.h +83 -0
  29. package/lib/clang/23/include/amo.h +220 -0
  30. package/lib/clang/23/include/amxavx512intrin.h +596 -0
  31. package/lib/clang/{19 → 23}/include/amxcomplexintrin.h +4 -6
  32. package/lib/clang/{19 → 23}/include/amxfp16intrin.h +35 -0
  33. package/lib/clang/23/include/amxfp8intrin.h +230 -0
  34. package/lib/clang/{19 → 23}/include/amxintrin.h +3 -35
  35. package/lib/clang/23/include/amxmovrsintrin.h +48 -0
  36. package/lib/clang/23/include/andes_vector.h +21 -0
  37. package/lib/clang/23/include/arm64_neon.h +21 -0
  38. package/lib/clang/{19 → 23}/include/arm64intr.h +10 -0
  39. package/lib/clang/{19 → 23}/include/arm_acle.h +67 -89
  40. package/lib/clang/{19 → 23}/include/arm_fp16.h +89 -89
  41. package/lib/clang/{19 → 23}/include/arm_neon.h +43614 -38901
  42. package/lib/clang/{19 → 23}/include/arm_sme.h +1028 -94
  43. package/lib/clang/{19 → 23}/include/arm_sve.h +7331 -5170
  44. package/lib/clang/{19 → 23}/include/arm_vector_types.h +87 -0
  45. package/lib/clang/23/include/avx10_2_512bf16intrin.h +568 -0
  46. package/lib/clang/23/include/avx10_2_512convertintrin.h +322 -0
  47. package/lib/clang/23/include/avx10_2_512minmaxintrin.h +127 -0
  48. package/lib/clang/23/include/avx10_2_512niintrin.h +314 -0
  49. package/lib/clang/23/include/avx10_2_512satcvtdsintrin.h +307 -0
  50. package/lib/clang/23/include/avx10_2_512satcvtintrin.h +301 -0
  51. package/lib/clang/23/include/avx10_2bf16intrin.h +1094 -0
  52. package/lib/clang/23/include/avx10_2convertintrin.h +3257 -0
  53. package/lib/clang/23/include/avx10_2copyintrin.h +66 -0
  54. package/lib/clang/23/include/avx10_2minmaxintrin.h +232 -0
  55. package/lib/clang/23/include/avx10_2niintrin.h +409 -0
  56. package/lib/clang/23/include/avx10_2satcvtdsintrin.h +376 -0
  57. package/lib/clang/23/include/avx10_2satcvtintrin.h +312 -0
  58. package/lib/clang/{19 → 23}/include/avx2intrin.h +284 -378
  59. package/lib/clang/{19 → 23}/include/avx512bf16intrin.h +25 -16
  60. package/lib/clang/{19 → 23}/include/avx512bitalgintrin.h +21 -32
  61. package/lib/clang/23/include/avx512bmmintrin.h +174 -0
  62. package/lib/clang/23/include/avx512bmmvlintrin.h +245 -0
  63. package/lib/clang/{19 → 23}/include/avx512bwintrin.h +405 -534
  64. package/lib/clang/23/include/avx512cdintrin.h +112 -0
  65. package/lib/clang/{19 → 23}/include/avx512dqintrin.h +132 -161
  66. package/lib/clang/{19 → 23}/include/avx512fintrin.h +1068 -1496
  67. package/lib/clang/{19 → 23}/include/avx512fp16intrin.h +126 -129
  68. package/lib/clang/23/include/avx512ifmaintrin.h +68 -0
  69. package/lib/clang/23/include/avx512ifmavlintrin.h +138 -0
  70. package/lib/clang/{19 → 23}/include/avx512vbmi2intrin.h +55 -48
  71. package/lib/clang/{19 → 23}/include/avx512vbmiintrin.h +19 -27
  72. package/lib/clang/{19 → 23}/include/avx512vbmivlintrin.h +35 -49
  73. package/lib/clang/{19 → 23}/include/avx512vlbf16intrin.h +32 -22
  74. package/lib/clang/{19 → 23}/include/avx512vlbitalgintrin.h +41 -57
  75. package/lib/clang/{19 → 23}/include/avx512vlbwintrin.h +494 -609
  76. package/lib/clang/23/include/avx512vlcdintrin.h +202 -0
  77. package/lib/clang/{19 → 23}/include/avx512vldqintrin.h +110 -127
  78. package/lib/clang/{19 → 23}/include/avx512vlfp16intrin.h +130 -111
  79. package/lib/clang/{19 → 23}/include/avx512vlintrin.h +1025 -1395
  80. package/lib/clang/{19 → 23}/include/avx512vlvbmi2intrin.h +102 -95
  81. package/lib/clang/{19 → 23}/include/avx512vlvnniintrin.h +50 -52
  82. package/lib/clang/{19 → 23}/include/avx512vlvp2intersectintrin.h +2 -2
  83. package/lib/clang/{19 → 23}/include/avx512vnniintrin.h +42 -45
  84. package/lib/clang/{19 → 23}/include/avx512vp2intersectintrin.h +2 -3
  85. package/lib/clang/{19 → 23}/include/avx512vpopcntdqintrin.h +10 -4
  86. package/lib/clang/{19 → 23}/include/avx512vpopcntdqvlintrin.h +20 -10
  87. package/lib/clang/{19 → 23}/include/avxifmaintrin.h +16 -0
  88. package/lib/clang/{19 → 23}/include/avxintrin.h +186 -248
  89. package/lib/clang/{19 → 23}/include/avxvnniint16intrin.h +130 -152
  90. package/lib/clang/{19 → 23}/include/avxvnniint8intrin.h +68 -85
  91. package/lib/clang/{19 → 23}/include/avxvnniintrin.h +39 -26
  92. package/lib/clang/{19 → 23}/include/bmi2intrin.h +15 -17
  93. package/lib/clang/{19 → 23}/include/bmiintrin.h +31 -41
  94. package/lib/clang/{19 → 23}/include/cmpccxaddintrin.h +1 -1
  95. package/lib/clang/{19 → 23}/include/cpuid.h +137 -37
  96. package/lib/clang/{19 → 23}/include/crc32intrin.h +10 -8
  97. package/lib/clang/23/include/cuda_wrappers/__utility/declval.h +28 -0
  98. package/lib/clang/23/include/cuda_wrappers/bits/c++config.h +61 -0
  99. package/lib/clang/23/include/cuda_wrappers/cmath +44 -0
  100. package/lib/clang/{19 → 23}/include/cuda_wrappers/new +2 -0
  101. package/lib/clang/{19 → 23}/include/emmintrin.h +306 -272
  102. package/lib/clang/23/include/endian.h +91 -0
  103. package/lib/clang/{19 → 23}/include/f16cintrin.h +23 -9
  104. package/lib/clang/23/include/float.h +48 -0
  105. package/lib/clang/23/include/fma4intrin.h +220 -0
  106. package/lib/clang/{19 → 23}/include/fmaintrin.h +96 -66
  107. package/lib/clang/{19 → 23}/include/gfniintrin.h +39 -12
  108. package/lib/clang/23/include/gpuintrin.h +348 -0
  109. package/lib/clang/{19 → 23}/include/hexagon_types.h +31 -24
  110. package/lib/clang/23/include/hlsl/hlsl_alias_intrinsics.h +222 -0
  111. package/lib/clang/23/include/hlsl/hlsl_alias_intrinsics_gen.inc +3869 -0
  112. package/lib/clang/23/include/hlsl/hlsl_basic_types.h +370 -0
  113. package/lib/clang/23/include/hlsl/hlsl_compat_overloads.h +559 -0
  114. package/lib/clang/23/include/hlsl/hlsl_detail.h +56 -0
  115. package/lib/clang/23/include/hlsl/hlsl_inline_intrinsics_gen.inc +546 -0
  116. package/lib/clang/23/include/hlsl/hlsl_intrinsic_helpers.h +170 -0
  117. package/lib/clang/23/include/hlsl/hlsl_intrinsics.h +331 -0
  118. package/lib/clang/23/include/hlsl/hlsl_spirv.h +28 -0
  119. package/lib/clang/23/include/hlsl.h +38 -0
  120. package/lib/clang/{19 → 23}/include/hvx_hexagon_protos.h +1041 -803
  121. package/lib/clang/{19 → 23}/include/immintrin.h +35 -185
  122. package/lib/clang/{19 → 23}/include/intrin.h +62 -21
  123. package/lib/clang/{19 → 23}/include/intrin0.h +10 -1
  124. package/lib/clang/{19 → 23}/include/keylockerintrin.h +0 -9
  125. package/lib/clang/{19 → 23}/include/larchintrin.h +24 -8
  126. package/lib/clang/{19 → 23}/include/lasxintrin.h +140 -25
  127. package/lib/clang/{19 → 23}/include/limits.h +7 -4
  128. package/lib/clang/{19 → 23}/include/llvm_libc_wrappers/assert.h +3 -5
  129. package/lib/clang/23/include/llvm_libc_wrappers/ctype.h +29 -0
  130. package/lib/clang/{19 → 23}/include/llvm_libc_wrappers/inttypes.h +3 -5
  131. package/lib/clang/23/include/llvm_libc_wrappers/stdio.h +52 -0
  132. package/lib/clang/{19 → 23}/include/llvm_libc_wrappers/stdlib.h +3 -16
  133. package/lib/clang/23/include/llvm_libc_wrappers/string.h +29 -0
  134. package/lib/clang/{19 → 23}/include/llvm_libc_wrappers/time.h +4 -10
  135. package/lib/clang/23/include/llvm_offload_wrappers/__llvm_offload.h +31 -0
  136. package/lib/clang/23/include/llvm_offload_wrappers/__llvm_offload_device.h +10 -0
  137. package/lib/clang/23/include/llvm_offload_wrappers/__llvm_offload_host.h +15 -0
  138. package/lib/clang/{19 → 23}/include/lsxintrin.h +27 -25
  139. package/lib/clang/{19 → 23}/include/lzcntintrin.h +13 -8
  140. package/lib/clang/{19 → 23}/include/mmintrin.h +241 -256
  141. package/lib/clang/{19 → 23}/include/module.modulemap +54 -9
  142. package/lib/clang/23/include/movrs_avx10_2_512intrin.h +98 -0
  143. package/lib/clang/23/include/movrs_avx10_2intrin.h +174 -0
  144. package/lib/clang/23/include/movrsintrin.h +59 -0
  145. package/lib/clang/23/include/nvptxintrin.h +208 -0
  146. package/lib/clang/{19 → 23}/include/opencl-c-base.h +28 -92
  147. package/lib/clang/{19 → 23}/include/opencl-c.h +506 -140
  148. package/lib/clang/{19 → 23}/include/openmp_wrappers/__clang_openmp_device_functions.h +18 -5
  149. package/lib/clang/{19 → 23}/include/openmp_wrappers/complex +7 -1
  150. package/lib/clang/{19 → 23}/include/openmp_wrappers/complex.h +6 -0
  151. package/lib/clang/{19 → 23}/include/openmp_wrappers/complex_cmath.h +7 -2
  152. package/lib/clang/{19 → 23}/include/openmp_wrappers/math.h +10 -0
  153. package/lib/clang/{19 → 23}/include/pmmintrin.h +24 -23
  154. package/lib/clang/{19 → 23}/include/popcntintrin.h +7 -7
  155. package/lib/clang/{19 → 23}/include/prfchwintrin.h +10 -13
  156. package/lib/clang/{19 → 23}/include/ptrauth.h +169 -14
  157. package/lib/clang/{19 → 23}/include/riscv_bitmanip.h +7 -0
  158. package/lib/clang/23/include/riscv_corev_alu.h +130 -0
  159. package/lib/clang/{19 → 23}/include/riscv_crypto.h +8 -0
  160. package/lib/clang/23/include/riscv_mips.h +36 -0
  161. package/lib/clang/23/include/riscv_nds.h +92 -0
  162. package/lib/clang/{19 → 23}/include/riscv_ntlh.h +2 -0
  163. package/lib/clang/23/include/riscv_packed_simd.h +644 -0
  164. package/lib/clang/{19 → 23}/include/riscv_vector.h +43 -5
  165. package/lib/clang/{19 → 23}/include/shaintrin.h +3 -2
  166. package/lib/clang/{19 → 23}/include/sifive_vector.h +76 -2
  167. package/lib/clang/23/include/sm4evexintrin.h +32 -0
  168. package/lib/clang/{19 → 23}/include/smmintrin.h +80 -56
  169. package/lib/clang/23/include/spirvintrin.h +167 -0
  170. package/lib/clang/{19 → 23}/include/stdalign.h +0 -5
  171. package/lib/clang/23/include/stdcountof.h +15 -0
  172. package/lib/clang/23/include/stddefer.h +19 -0
  173. package/lib/clang/{19 → 23}/include/stdint.h +23 -143
  174. package/lib/clang/{19 → 23}/include/tbmintrin.h +25 -37
  175. package/lib/clang/{19 → 23}/include/tmmintrin.h +125 -130
  176. package/lib/clang/{19 → 23}/include/vaesintrin.h +1 -2
  177. package/lib/clang/{19 → 23}/include/vecintrin.h +1783 -60
  178. package/lib/clang/{19 → 23}/include/wasm_simd128.h +184 -21
  179. package/lib/clang/{19 → 23}/include/x86gprintrin.h +0 -14
  180. package/lib/clang/{19 → 23}/include/x86intrin.h +0 -18
  181. package/lib/clang/{19 → 23}/include/xmmintrin.h +190 -221
  182. package/lib/clang/{19 → 23}/include/xopintrin.h +20 -10
  183. package/lib/clang/23/include/zos_wrappers/grp.h +19 -0
  184. package/lib/clang/23/include/zos_wrappers/locale.h +19 -0
  185. package/lib/clang/23/include/zos_wrappers/math.h +31 -0
  186. package/lib/clang/23/include/zos_wrappers/poll.h +19 -0
  187. package/lib/clang/23/include/zos_wrappers/stdlib.h +20 -0
  188. package/lib/clang/23/include/zos_wrappers/string.h +19 -0
  189. package/lib/clang/23/include/zos_wrappers/time.h +19 -0
  190. package/lib/clang/23/include/zos_wrappers/variant.h +19 -0
  191. package/package.json +6 -6
  192. package/lib/clang/19/include/__clang_cuda_complex_builtins.h +0 -285
  193. package/lib/clang/19/include/avx512cdintrin.h +0 -125
  194. package/lib/clang/19/include/avx512ifmaintrin.h +0 -70
  195. package/lib/clang/19/include/avx512ifmavlintrin.h +0 -111
  196. package/lib/clang/19/include/avx512vlcdintrin.h +0 -230
  197. package/lib/clang/19/include/cuda_wrappers/cmath +0 -90
  198. package/lib/clang/19/include/fma4intrin.h +0 -218
  199. package/lib/clang/19/include/hlsl/hlsl_basic_types.h +0 -74
  200. package/lib/clang/19/include/hlsl/hlsl_intrinsics.h +0 -1697
  201. package/lib/clang/19/include/hlsl.h +0 -15
  202. package/lib/clang/19/include/llvm_libc_wrappers/ctype.h +0 -102
  203. package/lib/clang/19/include/llvm_libc_wrappers/stdio.h +0 -80
  204. package/lib/clang/19/include/llvm_libc_wrappers/string.h +0 -96
  205. /package/lib/clang/{19 → 23}/include/__clang_cuda_builtin_vars.h +0 -0
  206. /package/lib/clang/{19 → 23}/include/__clang_cuda_cmath.h +0 -0
  207. /package/lib/clang/{19 → 23}/include/__clang_cuda_libdevice_declares.h +0 -0
  208. /package/lib/clang/{19 → 23}/include/__clang_hip_stdlib.h +0 -0
  209. /package/lib/clang/{19 → 23}/include/__stdarg___gnuc_va_list.h +0 -0
  210. /package/lib/clang/{19 → 23}/include/__stdarg___va_copy.h +0 -0
  211. /package/lib/clang/{19 → 23}/include/__stdarg_header_macro.h +0 -0
  212. /package/lib/clang/{19 → 23}/include/__stdarg_va_copy.h +0 -0
  213. /package/lib/clang/{19 → 23}/include/__stdarg_va_list.h +0 -0
  214. /package/lib/clang/{19 → 23}/include/__stddef_header_macro.h +0 -0
  215. /package/lib/clang/{19 → 23}/include/__stddef_max_align_t.h +0 -0
  216. /package/lib/clang/{19 → 23}/include/__stddef_null.h +0 -0
  217. /package/lib/clang/{19 → 23}/include/__stddef_nullptr_t.h +0 -0
  218. /package/lib/clang/{19 → 23}/include/__stddef_offsetof.h +0 -0
  219. /package/lib/clang/{19 → 23}/include/__stddef_ptrdiff_t.h +0 -0
  220. /package/lib/clang/{19 → 23}/include/__stddef_rsize_t.h +0 -0
  221. /package/lib/clang/{19 → 23}/include/__stddef_size_t.h +0 -0
  222. /package/lib/clang/{19 → 23}/include/__stddef_unreachable.h +0 -0
  223. /package/lib/clang/{19 → 23}/include/__stddef_wchar_t.h +0 -0
  224. /package/lib/clang/{19 → 23}/include/__stddef_wint_t.h +0 -0
  225. /package/lib/clang/{19 → 23}/include/__wmmintrin_aes.h +0 -0
  226. /package/lib/clang/{19 → 23}/include/__wmmintrin_pclmul.h +0 -0
  227. /package/lib/clang/{19 → 23}/include/ammintrin.h +0 -0
  228. /package/lib/clang/{19 → 23}/include/arm_bf16.h +0 -0
  229. /package/lib/clang/{19 → 23}/include/arm_cde.h +0 -0
  230. /package/lib/clang/{19 → 23}/include/arm_cmse.h +0 -0
  231. /package/lib/clang/{19 → 23}/include/arm_mve.h +0 -0
  232. /package/lib/clang/{19 → 23}/include/arm_neon_sve_bridge.h +0 -0
  233. /package/lib/clang/{19 → 23}/include/armintr.h +0 -0
  234. /package/lib/clang/{19 → 23}/include/avxneconvertintrin.h +0 -0
  235. /package/lib/clang/{19 → 23}/include/builtins.h +0 -0
  236. /package/lib/clang/{19 → 23}/include/cet.h +0 -0
  237. /package/lib/clang/{19 → 23}/include/cetintrin.h +0 -0
  238. /package/lib/clang/{19 → 23}/include/cldemoteintrin.h +0 -0
  239. /package/lib/clang/{19 → 23}/include/clflushoptintrin.h +0 -0
  240. /package/lib/clang/{19 → 23}/include/clwbintrin.h +0 -0
  241. /package/lib/clang/{19 → 23}/include/clzerointrin.h +0 -0
  242. /package/lib/clang/{19 → 23}/include/cuda_wrappers/algorithm +0 -0
  243. /package/lib/clang/{19 → 23}/include/cuda_wrappers/bits/basic_string.h +0 -0
  244. /package/lib/clang/{19 → 23}/include/cuda_wrappers/bits/basic_string.tcc +0 -0
  245. /package/lib/clang/{19 → 23}/include/cuda_wrappers/bits/shared_ptr_base.h +0 -0
  246. /package/lib/clang/{19 → 23}/include/cuda_wrappers/complex +0 -0
  247. /package/lib/clang/{19 → 23}/include/enqcmdintrin.h +0 -0
  248. /package/lib/clang/{19 → 23}/include/fxsrintrin.h +0 -0
  249. /package/lib/clang/{19 → 23}/include/hexagon_circ_brev_intrinsics.h +0 -0
  250. /package/lib/clang/{19 → 23}/include/hexagon_protos.h +0 -0
  251. /package/lib/clang/{19 → 23}/include/hresetintrin.h +0 -0
  252. /package/lib/clang/{19 → 23}/include/htmintrin.h +0 -0
  253. /package/lib/clang/{19 → 23}/include/htmxlintrin.h +0 -0
  254. /package/lib/clang/{19 → 23}/include/ia32intrin.h +0 -0
  255. /package/lib/clang/{19 → 23}/include/inttypes.h +0 -0
  256. /package/lib/clang/{19 → 23}/include/invpcidintrin.h +0 -0
  257. /package/lib/clang/{19 → 23}/include/iso646.h +0 -0
  258. /package/lib/clang/{19 → 23}/include/lwpintrin.h +0 -0
  259. /package/lib/clang/{19 → 23}/include/mm3dnow.h +0 -0
  260. /package/lib/clang/{19 → 23}/include/mm_malloc.h +0 -0
  261. /package/lib/clang/{19 → 23}/include/movdirintrin.h +0 -0
  262. /package/lib/clang/{19 → 23}/include/msa.h +0 -0
  263. /package/lib/clang/{19 → 23}/include/mwaitxintrin.h +0 -0
  264. /package/lib/clang/{19 → 23}/include/nmmintrin.h +0 -0
  265. /package/lib/clang/{19 → 23}/include/openmp_wrappers/cmath +0 -0
  266. /package/lib/clang/{19 → 23}/include/openmp_wrappers/new +0 -0
  267. /package/lib/clang/{19 → 23}/include/pconfigintrin.h +0 -0
  268. /package/lib/clang/{19 → 23}/include/pkuintrin.h +0 -0
  269. /package/lib/clang/{19 → 23}/include/ppc_wrappers/bmi2intrin.h +0 -0
  270. /package/lib/clang/{19 → 23}/include/ppc_wrappers/bmiintrin.h +0 -0
  271. /package/lib/clang/{19 → 23}/include/ppc_wrappers/emmintrin.h +0 -0
  272. /package/lib/clang/{19 → 23}/include/ppc_wrappers/immintrin.h +0 -0
  273. /package/lib/clang/{19 → 23}/include/ppc_wrappers/mm_malloc.h +0 -0
  274. /package/lib/clang/{19 → 23}/include/ppc_wrappers/mmintrin.h +0 -0
  275. /package/lib/clang/{19 → 23}/include/ppc_wrappers/nmmintrin.h +0 -0
  276. /package/lib/clang/{19 → 23}/include/ppc_wrappers/pmmintrin.h +0 -0
  277. /package/lib/clang/{19 → 23}/include/ppc_wrappers/smmintrin.h +0 -0
  278. /package/lib/clang/{19 → 23}/include/ppc_wrappers/tmmintrin.h +0 -0
  279. /package/lib/clang/{19 → 23}/include/ppc_wrappers/x86gprintrin.h +0 -0
  280. /package/lib/clang/{19 → 23}/include/ppc_wrappers/x86intrin.h +0 -0
  281. /package/lib/clang/{19 → 23}/include/ppc_wrappers/xmmintrin.h +0 -0
  282. /package/lib/clang/{19 → 23}/include/prfchiintrin.h +0 -0
  283. /package/lib/clang/{19 → 23}/include/ptwriteintrin.h +0 -0
  284. /package/lib/clang/{19 → 23}/include/raointintrin.h +0 -0
  285. /package/lib/clang/{19 → 23}/include/rdpruintrin.h +0 -0
  286. /package/lib/clang/{19 → 23}/include/rdseedintrin.h +0 -0
  287. /package/lib/clang/{19 → 23}/include/rtmintrin.h +0 -0
  288. /package/lib/clang/{19 → 23}/include/s390intrin.h +0 -0
  289. /package/lib/clang/{19 → 23}/include/serializeintrin.h +0 -0
  290. /package/lib/clang/{19 → 23}/include/sgxintrin.h +0 -0
  291. /package/lib/clang/{19 → 23}/include/sha512intrin.h +0 -0
  292. /package/lib/clang/{19 → 23}/include/sm3intrin.h +0 -0
  293. /package/lib/clang/{19 → 23}/include/sm4intrin.h +0 -0
  294. /package/lib/clang/{19 → 23}/include/stdarg.h +0 -0
  295. /package/lib/clang/{19 → 23}/include/stdatomic.h +0 -0
  296. /package/lib/clang/{19 → 23}/include/stdbool.h +0 -0
  297. /package/lib/clang/{19 → 23}/include/stdckdint.h +0 -0
  298. /package/lib/clang/{19 → 23}/include/stddef.h +0 -0
  299. /package/lib/clang/{19 → 23}/include/stdnoreturn.h +0 -0
  300. /package/lib/clang/{19 → 23}/include/tgmath.h +0 -0
  301. /package/lib/clang/{19 → 23}/include/tsxldtrkintrin.h +0 -0
  302. /package/lib/clang/{19 → 23}/include/uintrintrin.h +0 -0
  303. /package/lib/clang/{19 → 23}/include/unwind.h +0 -0
  304. /package/lib/clang/{19 → 23}/include/usermsrintrin.h +0 -0
  305. /package/lib/clang/{19 → 23}/include/vadefs.h +0 -0
  306. /package/lib/clang/{19 → 23}/include/varargs.h +0 -0
  307. /package/lib/clang/{19 → 23}/include/velintrin.h +0 -0
  308. /package/lib/clang/{19 → 23}/include/velintrin_approx.h +0 -0
  309. /package/lib/clang/{19 → 23}/include/velintrin_gen.h +0 -0
  310. /package/lib/clang/{19 → 23}/include/vpclmulqdqintrin.h +0 -0
  311. /package/lib/clang/{19 → 23}/include/waitpkgintrin.h +0 -0
  312. /package/lib/clang/{19 → 23}/include/wbnoinvdintrin.h +0 -0
  313. /package/lib/clang/{19 → 23}/include/wmmintrin.h +0 -0
  314. /package/lib/clang/{19 → 23}/include/xsavecintrin.h +0 -0
  315. /package/lib/clang/{19 → 23}/include/xsaveintrin.h +0 -0
  316. /package/lib/clang/{19 → 23}/include/xsaveoptintrin.h +0 -0
  317. /package/lib/clang/{19 → 23}/include/xsavesintrin.h +0 -0
  318. /package/lib/clang/{19 → 23}/include/xtestintrin.h +0 -0
  319. /package/lib/clang/{19 → 23}/include/yvals_core.h +0 -0
  320. /package/lib/clang/{19 → 23}/include/zos_wrappers/builtins.h +0 -0
@@ -0,0 +1,411 @@
1
+ //===---- __clang_gpu_device_functions.h - GPU device functions ------------===
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_GPU_DEVICE_FUNCTIONS_H__
10
+ #define __CLANG_GPU_DEVICE_FUNCTIONS_H__
11
+
12
+ #if defined(__HIP__) || defined(__CUDA__)
13
+
14
+ #ifndef __device__
15
+ #define __host__ __attribute__((host))
16
+ #define __device__ __attribute__((device))
17
+ #define __global__ __attribute__((global))
18
+ #define __shared__ __attribute__((shared))
19
+ #define __constant__ __attribute__((constant))
20
+ #define __managed__ __attribute__((managed))
21
+ #endif
22
+
23
+ #include <gpuintrin.h>
24
+
25
+ #pragma push_macro("__GPU_DEVICE__")
26
+ #define __GPU_DEVICE__ static __inline__ __attribute__((device, always_inline))
27
+
28
+ #pragma push_macro("MAYBE_UNDEF")
29
+ #define MAYBE_UNDEF __attribute__((maybe_undef))
30
+
31
+ // warpSize and the threadIdx/blockIdx/blockDim/gridDim coordinate variables.
32
+ #include <__clang_gpu_builtin_vars.h>
33
+
34
+ //===----------------------------------------------------------------------===//
35
+ // Integer intrinsics.
36
+ //===----------------------------------------------------------------------===//
37
+
38
+ __GPU_DEVICE__ unsigned int __popc(unsigned int __x) {
39
+ return __builtin_popcountg(__x);
40
+ }
41
+ __GPU_DEVICE__ unsigned int __popcll(unsigned long long __x) {
42
+ return __builtin_popcountg(__x);
43
+ }
44
+
45
+ __GPU_DEVICE__ int __clz(int __x) {
46
+ return __builtin_clzg((unsigned int)__x, 32);
47
+ }
48
+ __GPU_DEVICE__ int __clzll(long long __x) {
49
+ return __builtin_clzg((unsigned long long)__x, 64);
50
+ }
51
+
52
+ __GPU_DEVICE__ int __ffs(int __x) {
53
+ return __builtin_ctzg((unsigned int)__x, -1) + 1;
54
+ }
55
+ __GPU_DEVICE__ int __ffs(unsigned int __x) {
56
+ return __builtin_ctzg(__x, -1) + 1;
57
+ }
58
+ __GPU_DEVICE__ int __ffsll(long long __x) {
59
+ return __builtin_ctzg((unsigned long long)__x, -1) + 1;
60
+ }
61
+ __GPU_DEVICE__ int __ffsll(unsigned long long __x) {
62
+ return __builtin_ctzg(__x, -1) + 1;
63
+ }
64
+
65
+ __GPU_DEVICE__ unsigned int __brev(unsigned int __x) {
66
+ return __builtin_elementwise_bitreverse(__x);
67
+ }
68
+ __GPU_DEVICE__ unsigned long long __brevll(unsigned long long __x) {
69
+ return __builtin_elementwise_bitreverse(__x);
70
+ }
71
+
72
+ __GPU_DEVICE__ int __mul24(int __x, int __y) {
73
+ return ((int(unsigned(__x) << 8) >> 8)) * ((int(unsigned(__y) << 8) >> 8));
74
+ }
75
+ __GPU_DEVICE__ int __umul24(unsigned int __x, unsigned int __y) {
76
+ return int((__x & 0x00ffffffu) * (__y & 0x00ffffffu));
77
+ }
78
+
79
+ __GPU_DEVICE__ int __mulhi(int __x, int __y) {
80
+ return int(((long long)__x * (long long)__y) >> 32);
81
+ }
82
+ __GPU_DEVICE__ unsigned int __umulhi(unsigned int __x, unsigned int __y) {
83
+ return (unsigned int)(((unsigned long long)__x * (unsigned long long)__y) >>
84
+ 32);
85
+ }
86
+ __GPU_DEVICE__ long long __mul64hi(long long __x, long long __y) {
87
+ return (long long)(((__int128)__x * (__int128)__y) >> 64);
88
+ }
89
+ __GPU_DEVICE__ unsigned long long __umul64hi(unsigned long long __x,
90
+ unsigned long long __y) {
91
+ return (
92
+ unsigned long long)(((unsigned __int128)__x * (unsigned __int128)__y) >>
93
+ 64);
94
+ }
95
+
96
+ __GPU_DEVICE__ unsigned int __sad(int __x, int __y, unsigned int __z) {
97
+ return __x > __y ? __x - __y + __z : __y - __x + __z;
98
+ }
99
+ __GPU_DEVICE__ unsigned int __usad(unsigned int __x, unsigned int __y,
100
+ unsigned int __z) {
101
+ return __x > __y ? __x - __y + __z : __y - __x + __z;
102
+ }
103
+
104
+ __GPU_DEVICE__ int __hadd(int __x, int __y) {
105
+ return int(((long long)__x + (long long)__y) >> 1);
106
+ }
107
+ __GPU_DEVICE__ int __rhadd(int __x, int __y) {
108
+ return int(((long long)__x + (long long)__y + 1) >> 1);
109
+ }
110
+ __GPU_DEVICE__ unsigned int __uhadd(unsigned int __x, unsigned int __y) {
111
+ return (unsigned int)(((unsigned long long)__x + (unsigned long long)__y) >>
112
+ 1);
113
+ }
114
+ __GPU_DEVICE__ unsigned int __urhadd(unsigned int __x, unsigned int __y) {
115
+ return (
116
+ unsigned int)(((unsigned long long)__x + (unsigned long long)__y + 1) >>
117
+ 1);
118
+ }
119
+
120
+ __GPU_DEVICE__ unsigned int __byte_perm(unsigned int __x, unsigned int __y,
121
+ unsigned int __s) {
122
+ unsigned long long __tmp = ((unsigned long long)__y << 32) | __x;
123
+ unsigned int __result = 0;
124
+ for (int __i = 0; __i < 4; ++__i) {
125
+ unsigned int __sel = (__s >> (__i * 4)) & 0x7u;
126
+ __result |= (unsigned int)((__tmp >> (__sel * 8)) & 0xffu) << (__i * 8);
127
+ }
128
+ return __result;
129
+ }
130
+
131
+ //===----------------------------------------------------------------------===//
132
+ // Bitfield operations.
133
+ //===----------------------------------------------------------------------===//
134
+
135
+ __GPU_DEVICE__ unsigned int __lastbit_u32_u64(unsigned long long __x) {
136
+ return (unsigned int)__builtin_ctzg(__x, -1);
137
+ }
138
+
139
+ __GPU_DEVICE__ unsigned int __bitextract_u32(unsigned int __src,
140
+ unsigned int __offset,
141
+ unsigned int __width) {
142
+ unsigned int __o = __offset & 31u;
143
+ unsigned int __w = __width & 31u;
144
+ return __w == 0 ? 0u : (__src << (32u - __o - __w)) >> (32u - __w);
145
+ }
146
+ __GPU_DEVICE__ unsigned long long __bitextract_u64(unsigned long long __src,
147
+ unsigned int __offset,
148
+ unsigned int __width) {
149
+ unsigned long long __o = __offset & 63u;
150
+ unsigned long long __w = __width & 63u;
151
+ return __w == 0 ? 0ull : (__src << (64ull - __o - __w)) >> (64ull - __w);
152
+ }
153
+
154
+ __GPU_DEVICE__ unsigned int __bitinsert_u32(unsigned int __dst,
155
+ unsigned int __src,
156
+ unsigned int __offset,
157
+ unsigned int __width) {
158
+ unsigned int __o = __offset & 31u;
159
+ unsigned int __mask = (1u << (__width & 31u)) - 1u;
160
+ return (__dst & ~(__mask << __o)) | ((__src & __mask) << __o);
161
+ }
162
+ __GPU_DEVICE__ unsigned long long __bitinsert_u64(unsigned long long __dst,
163
+ unsigned long long __src,
164
+ unsigned int __offset,
165
+ unsigned int __width) {
166
+ unsigned long long __o = __offset & 63u;
167
+ unsigned long long __mask = (1ull << (__width & 63u)) - 1ull;
168
+ return (__dst & ~(__mask << __o)) | ((__src & __mask) << __o);
169
+ }
170
+
171
+ //===----------------------------------------------------------------------===//
172
+ // Type punning.
173
+ //===----------------------------------------------------------------------===//
174
+
175
+ __GPU_DEVICE__ int __float_as_int(float __x) {
176
+ return __builtin_bit_cast(int, __x);
177
+ }
178
+ __GPU_DEVICE__ unsigned int __float_as_uint(float __x) {
179
+ return __builtin_bit_cast(unsigned int, __x);
180
+ }
181
+ __GPU_DEVICE__ float __int_as_float(int __x) {
182
+ return __builtin_bit_cast(float, __x);
183
+ }
184
+ __GPU_DEVICE__ float __uint_as_float(unsigned int __x) {
185
+ return __builtin_bit_cast(float, __x);
186
+ }
187
+ __GPU_DEVICE__ long long __double_as_longlong(double __x) {
188
+ return __builtin_bit_cast(long long, __x);
189
+ }
190
+ __GPU_DEVICE__ double __longlong_as_double(long long __x) {
191
+ return __builtin_bit_cast(double, __x);
192
+ }
193
+ __GPU_DEVICE__ int __double2hiint(double __x) {
194
+ return int(__builtin_bit_cast(unsigned long long, __x) >> 32);
195
+ }
196
+ __GPU_DEVICE__ int __double2loint(double __x) {
197
+ return int(__builtin_bit_cast(unsigned long long, __x));
198
+ }
199
+ __GPU_DEVICE__ double __hiloint2double(int __hi, int __lo) {
200
+ return __builtin_bit_cast(double,
201
+ ((unsigned long long)(unsigned int)__hi << 32) |
202
+ (unsigned long long)(unsigned int)__lo);
203
+ }
204
+
205
+ //===----------------------------------------------------------------------===//
206
+ // Numeric conversions with explicit rounding.
207
+ //===----------------------------------------------------------------------===//
208
+
209
+ // Floating-point to integer conversions map directly onto the rounding
210
+ // builtins.
211
+ #define __GPU_CVT_FP2INT(__name, __res, __arg) \
212
+ __GPU_DEVICE__ __res __name##_rd(__arg __x) { \
213
+ return (__res)__builtin_elementwise_floor(__x); \
214
+ } \
215
+ __GPU_DEVICE__ __res __name##_rn(__arg __x) { \
216
+ return (__res)__builtin_elementwise_rint(__x); \
217
+ } \
218
+ __GPU_DEVICE__ __res __name##_ru(__arg __x) { \
219
+ return (__res)__builtin_elementwise_ceil(__x); \
220
+ } \
221
+ __GPU_DEVICE__ __res __name##_rz(__arg __x) { return (__res)__x; }
222
+
223
+ __GPU_CVT_FP2INT(__double2int, int, double)
224
+ __GPU_CVT_FP2INT(__double2uint, unsigned int, double)
225
+ __GPU_CVT_FP2INT(__double2ll, long long, double)
226
+ __GPU_CVT_FP2INT(__double2ull, unsigned long long, double)
227
+ __GPU_CVT_FP2INT(__float2int, int, float)
228
+ __GPU_CVT_FP2INT(__float2uint, unsigned int, float)
229
+ __GPU_CVT_FP2INT(__float2ll, long long, float)
230
+ __GPU_CVT_FP2INT(__float2ull, unsigned long long, float)
231
+
232
+ #undef __GPU_CVT_FP2INT
233
+
234
+ // Round-to-nearest is a plain conversion, so the '_rn' variants are exact.
235
+ //
236
+ // TODO: Directed rounding (rd/ru/rz) for integer-to-float and the narrowing
237
+ // double-to-float conversions has no portable builtin yet (need pragma STDC
238
+ // FENV_ROUND pragma), so these are stubbed.
239
+ #define __GPU_CVT_TO_F(__name, __res, __arg) \
240
+ __GPU_DEVICE__ __res __name##_rd(__arg __x) { __builtin_trap(); } \
241
+ __GPU_DEVICE__ __res __name##_rn(__arg __x) { return (__res)__x; } \
242
+ __GPU_DEVICE__ __res __name##_ru(__arg __x) { __builtin_trap(); } \
243
+ __GPU_DEVICE__ __res __name##_rz(__arg __x) { __builtin_trap(); }
244
+
245
+ __GPU_CVT_TO_F(__int2float, float, int)
246
+ __GPU_CVT_TO_F(__uint2float, float, unsigned int)
247
+ __GPU_CVT_TO_F(__ll2float, float, long long)
248
+ __GPU_CVT_TO_F(__ull2float, float, unsigned long long)
249
+ __GPU_CVT_TO_F(__ll2double, double, long long)
250
+ __GPU_CVT_TO_F(__ull2double, double, unsigned long long)
251
+ __GPU_CVT_TO_F(__double2float, float, double)
252
+
253
+ #undef __GPU_CVT_TO_F
254
+
255
+ // Integer to double conversions are always exact, so only round-to-nearest is
256
+ // defined by CUDA and HIP.
257
+ __GPU_DEVICE__ double __int2double_rn(int __x) { return (double)__x; }
258
+ __GPU_DEVICE__ double __uint2double_rn(unsigned int __x) { return (double)__x; }
259
+
260
+ //===----------------------------------------------------------------------===//
261
+ // Wavefront vote and lane identity.
262
+ //===----------------------------------------------------------------------===//
263
+
264
+ __GPU_DEVICE__ unsigned int __lane_id(void) { return __gpu_lane_id(); }
265
+
266
+ __GPU_DEVICE__ unsigned long long __ballot(int __pred) {
267
+ return __gpu_ballot(__gpu_lane_mask(), __pred);
268
+ }
269
+ __GPU_DEVICE__ unsigned long long __ballot64(int __pred) {
270
+ return __gpu_ballot(__gpu_lane_mask(), __pred);
271
+ }
272
+ __GPU_DEVICE__ unsigned long long __activemask(void) {
273
+ return __gpu_ballot(__gpu_lane_mask(), 1);
274
+ }
275
+
276
+ __GPU_DEVICE__ int __all(int __pred) {
277
+ return __gpu_ballot(__gpu_lane_mask(), __pred) == __gpu_lane_mask();
278
+ }
279
+ __GPU_DEVICE__ int __any(int __pred) {
280
+ return __gpu_ballot(__gpu_lane_mask(), __pred) != 0ull;
281
+ }
282
+
283
+ template <typename __T>
284
+ __GPU_DEVICE__ int __gpu_fns_impl(__T __mask, unsigned int __base,
285
+ int __offset) {
286
+ const int __bits = int(sizeof(__T)) * 8;
287
+ __T __m = __mask;
288
+ int __off = __offset;
289
+ if (__offset == 0) {
290
+ __m &= (__T(1) << __base);
291
+ __off = 1;
292
+ } else if (__offset < 0) {
293
+ __m = __builtin_elementwise_bitreverse(__mask);
294
+ __base = (unsigned int)(__bits - 1) - __base;
295
+ __off = -__offset;
296
+ }
297
+ __m &= (~__T(0)) << __base;
298
+ if (__builtin_popcountg(__m) < __off)
299
+ return -1;
300
+ int __total = 0;
301
+ for (int __i = __bits / 2; __i > 0; __i >>= 1) {
302
+ __T __lo = __m & ((__T(1) << __i) - 1);
303
+ int __pcnt = __builtin_popcountg(__lo);
304
+ if (__pcnt < __off) {
305
+ __m >>= __i;
306
+ __off -= __pcnt;
307
+ __total += __i;
308
+ } else {
309
+ __m = __lo;
310
+ }
311
+ }
312
+ return __offset < 0 ? (__bits - 1) - __total : __total;
313
+ }
314
+ __GPU_DEVICE__ int __fns64(unsigned long long __mask, unsigned int __base,
315
+ int __offset) {
316
+ return __gpu_fns_impl(__mask, __base, __offset);
317
+ }
318
+ __GPU_DEVICE__ int __fns32(unsigned long long __mask, unsigned int __base,
319
+ int __offset) {
320
+ return __gpu_fns_impl((unsigned int)__mask, __base, __offset);
321
+ }
322
+ __GPU_DEVICE__ int __fns(unsigned int __mask, unsigned int __base,
323
+ int __offset) {
324
+ return __fns32(__mask, __base, __offset);
325
+ }
326
+
327
+ //===----------------------------------------------------------------------===//
328
+ // Synchronization and fences
329
+ //===----------------------------------------------------------------------===//
330
+
331
+ // CUDA provides __syncthreads as an NVPTX compiler builtin directly.
332
+ #if !defined(__CUDA__)
333
+ __GPU_DEVICE__ void __syncthreads(void) { __gpu_sync_threads(); }
334
+ #endif
335
+
336
+ template <typename __Fn>
337
+ __GPU_DEVICE__ int __gpu_block_reduce_impl(int __val, int __init, __Fn __op) {
338
+ static __attribute__((shared)) int __scratch[32];
339
+ unsigned int __lanes = __gpu_num_lanes();
340
+ unsigned int __nthreads = __gpu_num_threads(__GPU_X_DIM) *
341
+ __gpu_num_threads(__GPU_Y_DIM) *
342
+ __gpu_num_threads(__GPU_Z_DIM);
343
+ unsigned int __nwarps = (__nthreads + __lanes - 1) / __lanes;
344
+ unsigned int __tid =
345
+ (__gpu_thread_id(__GPU_Z_DIM) * __gpu_num_threads(__GPU_Y_DIM) +
346
+ __gpu_thread_id(__GPU_Y_DIM)) *
347
+ __gpu_num_threads(__GPU_X_DIM) +
348
+ __gpu_thread_id(__GPU_X_DIM);
349
+
350
+ if (__gpu_is_first_in_lane(__gpu_lane_mask()))
351
+ __scratch[__tid / __lanes] = __val;
352
+ __gpu_sync_threads();
353
+
354
+ int __acc = __init;
355
+ for (unsigned int __i = 0; __i < __nwarps; ++__i)
356
+ __acc = __op(__acc, __scratch[__i]);
357
+ __gpu_sync_threads();
358
+ return __acc;
359
+ }
360
+
361
+ __GPU_DEVICE__ int __syncthreads_count(int __pred) {
362
+ unsigned long long __mask = __gpu_lane_mask();
363
+ int __val = __builtin_popcountg(__gpu_ballot(__mask, __pred));
364
+ return __gpu_block_reduce_impl(__val, 0,
365
+ [](int __a, int __b) { return __a + __b; });
366
+ }
367
+ __GPU_DEVICE__ int __syncthreads_and(int __pred) {
368
+ unsigned long long __mask = __gpu_lane_mask();
369
+ int __val = __gpu_ballot(__mask, __pred) == __mask;
370
+ return __gpu_block_reduce_impl(__val, 1,
371
+ [](int __a, int __b) { return __a & __b; });
372
+ }
373
+ __GPU_DEVICE__ int __syncthreads_or(int __pred) {
374
+ unsigned long long __mask = __gpu_lane_mask();
375
+ int __val = __gpu_ballot(__mask, __pred) != 0ull;
376
+ return __gpu_block_reduce_impl(__val, 0,
377
+ [](int __a, int __b) { return __a | __b; });
378
+ }
379
+
380
+ __GPU_DEVICE__ void __threadfence(void) {
381
+ __scoped_atomic_thread_fence(__ATOMIC_SEQ_CST, __MEMORY_SCOPE_DEVICE);
382
+ }
383
+ __GPU_DEVICE__ void __threadfence_block(void) {
384
+ __scoped_atomic_thread_fence(__ATOMIC_SEQ_CST, __MEMORY_SCOPE_WRKGRP);
385
+ }
386
+ __GPU_DEVICE__ void __threadfence_system(void) {
387
+ __scoped_atomic_thread_fence(__ATOMIC_SEQ_CST, __MEMORY_SCOPE_SYSTEM);
388
+ }
389
+
390
+ //===----------------------------------------------------------------------===//
391
+ // Timers
392
+ //===----------------------------------------------------------------------===//
393
+
394
+ __GPU_DEVICE__ long long __clock64(void) {
395
+ return (long long)__builtin_readcyclecounter();
396
+ }
397
+ __GPU_DEVICE__ long long __clock(void) { return __clock64(); }
398
+ __GPU_DEVICE__ long long clock64(void) { return __clock64(); }
399
+ __GPU_DEVICE__ long long clock(void) { return __clock(); }
400
+ __GPU_DEVICE__ long long wall_clock64(void) {
401
+ return (long long)__builtin_readsteadycounter();
402
+ }
403
+
404
+ // Warp shuffle / synchronization / reduction intrinsics.
405
+ #include <__clang_gpu_intrinsics.h>
406
+
407
+ #pragma pop_macro("MAYBE_UNDEF")
408
+ #pragma pop_macro("__GPU_DEVICE__")
409
+
410
+ #endif // device compile
411
+ #endif // __CLANG_GPU_DEVICE_FUNCTIONS_H__
@@ -0,0 +1,242 @@
1
+ //===--- __clang_gpu_intrinsics.h - Device-side GPU intrinsic wrappers ------===
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_GPU_INTRINSICS_H__
10
+ #define __CLANG_GPU_INTRINSICS_H__
11
+
12
+ #if defined(__HIP__) || defined(__CUDA__)
13
+
14
+ #ifndef __GPU_DEVICE__
15
+ #error \
16
+ "__clang_gpu_intrinsics.h must be included via __clang_gpu_device_functions.h"
17
+ #endif
18
+
19
+ //===----------------------------------------------------------------------===//
20
+ // Wavefront shuffles
21
+ //===----------------------------------------------------------------------===//
22
+
23
+ template <typename __T>
24
+ __GPU_DEVICE__ __T __gpu_shuffle_idx_impl(__T __v, unsigned int __idx,
25
+ int __w) {
26
+ if constexpr (sizeof(__T) == sizeof(unsigned long long)) {
27
+ return __builtin_bit_cast(
28
+ __T, __gpu_shuffle_idx_u64(__gpu_lane_mask(), __idx,
29
+ __builtin_bit_cast(unsigned long long, __v),
30
+ (unsigned int)__w));
31
+ } else {
32
+ return __builtin_bit_cast(
33
+ __T, __gpu_shuffle_idx_u32(__gpu_lane_mask(), __idx,
34
+ __builtin_bit_cast(unsigned int, __v),
35
+ (unsigned int)__w));
36
+ }
37
+ }
38
+
39
+ template <typename __T>
40
+ __GPU_DEVICE__ __T __shfl(MAYBE_UNDEF __T __var, int __src_lane,
41
+ int __width = warpSize) {
42
+ return __gpu_shuffle_idx_impl(
43
+ __var, (unsigned int)(__src_lane & (__width - 1)), __width);
44
+ }
45
+ template <typename __T>
46
+ __GPU_DEVICE__ __T __shfl_up(MAYBE_UNDEF __T __var, unsigned int __delta,
47
+ int __width = warpSize) {
48
+ int __rel = int(__gpu_lane_id() & (unsigned int)(__width - 1));
49
+ int __tgt = __rel - int(__delta);
50
+ return __gpu_shuffle_idx_impl(
51
+ __var, (unsigned int)(__tgt < 0 ? __rel : __tgt), __width);
52
+ }
53
+ template <typename __T>
54
+ __GPU_DEVICE__ __T __shfl_down(MAYBE_UNDEF __T __var, unsigned int __delta,
55
+ int __width = warpSize) {
56
+ int __rel = int(__gpu_lane_id() & (unsigned int)(__width - 1));
57
+ int __tgt = __rel + int(__delta);
58
+ return __gpu_shuffle_idx_impl(
59
+ __var, (unsigned int)(__tgt >= __width ? __rel : __tgt), __width);
60
+ }
61
+ template <typename __T>
62
+ __GPU_DEVICE__ __T __shfl_xor(MAYBE_UNDEF __T __var, int __lane_mask,
63
+ int __width = warpSize) {
64
+ int __rel = int(__gpu_lane_id() & (unsigned int)(__width - 1));
65
+ int __tgt = __rel ^ __lane_mask;
66
+ return __gpu_shuffle_idx_impl(
67
+ __var, (unsigned int)(__tgt >= __width ? __rel : __tgt), __width);
68
+ }
69
+
70
+ //===----------------------------------------------------------------------===//
71
+ // Warp synchronization
72
+ //===----------------------------------------------------------------------===//
73
+
74
+ __GPU_DEVICE__ void __syncwarp(unsigned long long __mask = -1) {
75
+ __scoped_atomic_thread_fence(__ATOMIC_RELEASE, __MEMORY_SCOPE_WVFRNT);
76
+ __gpu_sync_lane(__mask);
77
+ __scoped_atomic_thread_fence(__ATOMIC_ACQUIRE, __MEMORY_SCOPE_WVFRNT);
78
+ }
79
+
80
+ //===----------------------------------------------------------------------===//
81
+ // Wave syncrhonization sync aliases.
82
+ //===----------------------------------------------------------------------===//
83
+
84
+ template <typename __MaskT>
85
+ __GPU_DEVICE__ unsigned long long __ballot_sync(__MaskT __mask, int __pred) {
86
+ return __ballot(__pred) & (unsigned long long)__mask;
87
+ }
88
+ template <typename __MaskT>
89
+ __GPU_DEVICE__ int __all_sync(__MaskT __mask, int __pred) {
90
+ return __ballot_sync(__mask, __pred) == (unsigned long long)__mask;
91
+ }
92
+ template <typename __MaskT>
93
+ __GPU_DEVICE__ int __any_sync(__MaskT __mask, int __pred) {
94
+ return __ballot_sync(__mask, __pred) != 0ull;
95
+ }
96
+
97
+ template <typename __MaskT, typename __T>
98
+ __GPU_DEVICE__ __T __shfl_sync(__MaskT __mask, MAYBE_UNDEF __T __var,
99
+ int __src_lane, int __width = warpSize) {
100
+ (void)__mask;
101
+ return __shfl(__var, __src_lane, __width);
102
+ }
103
+ template <typename __MaskT, typename __T>
104
+ __GPU_DEVICE__ __T __shfl_up_sync(__MaskT __mask, MAYBE_UNDEF __T __var,
105
+ unsigned int __delta,
106
+ int __width = warpSize) {
107
+ (void)__mask;
108
+ return __shfl_up(__var, __delta, __width);
109
+ }
110
+ template <typename __MaskT, typename __T>
111
+ __GPU_DEVICE__ __T __shfl_down_sync(__MaskT __mask, MAYBE_UNDEF __T __var,
112
+ unsigned int __delta,
113
+ int __width = warpSize) {
114
+ (void)__mask;
115
+ return __shfl_down(__var, __delta, __width);
116
+ }
117
+ template <typename __MaskT, typename __T>
118
+ __GPU_DEVICE__ __T __shfl_xor_sync(__MaskT __mask, MAYBE_UNDEF __T __var,
119
+ int __lane_mask, int __width = warpSize) {
120
+ (void)__mask;
121
+ return __shfl_xor(__var, __lane_mask, __width);
122
+ }
123
+
124
+ //===----------------------------------------------------------------------===//
125
+ // Match primitives.
126
+ //===----------------------------------------------------------------------===//
127
+
128
+ template <typename __T>
129
+ __GPU_DEVICE__ unsigned long long __match_any(__T __value) {
130
+ if constexpr (sizeof(__T) == sizeof(unsigned long long)) {
131
+ return __gpu_match_any_u64(__gpu_lane_mask(),
132
+ __builtin_bit_cast(unsigned long long, __value));
133
+ } else {
134
+ return __gpu_match_any_u32(__gpu_lane_mask(),
135
+ __builtin_bit_cast(unsigned int, __value));
136
+ }
137
+ }
138
+ template <typename __MaskT, typename __T>
139
+ __GPU_DEVICE__ unsigned long long __match_any_sync(__MaskT __mask,
140
+ __T __value) {
141
+ return __match_any(__value) & (unsigned long long)__mask;
142
+ }
143
+
144
+ template <typename __T>
145
+ __GPU_DEVICE__ unsigned long long __match_all(__T __value, int *__pred) {
146
+ unsigned long long __r;
147
+ if constexpr (sizeof(__T) == sizeof(unsigned long long)) {
148
+ __r = __gpu_match_all_u64(__gpu_lane_mask(),
149
+ __builtin_bit_cast(unsigned long long, __value));
150
+ } else {
151
+ __r = __gpu_match_all_u32(__gpu_lane_mask(),
152
+ __builtin_bit_cast(unsigned int, __value));
153
+ }
154
+ *__pred = __r != 0;
155
+ return __r;
156
+ }
157
+ template <typename __MaskT, typename __T>
158
+ __GPU_DEVICE__ unsigned long long __match_all_sync(__MaskT __mask, __T __value,
159
+ int *__pred) {
160
+ (void)__mask;
161
+ return __match_all(__value, __pred);
162
+ }
163
+
164
+ //===----------------------------------------------------------------------===//
165
+ // Wave reductions.
166
+ //===----------------------------------------------------------------------===//
167
+
168
+ template <typename __MaskT>
169
+ __GPU_DEVICE__ unsigned int __reduce_add_sync(__MaskT __mask,
170
+ unsigned int __val) {
171
+ return __gpu_lane_add_u32((unsigned long long)__mask, __val);
172
+ }
173
+ template <typename __MaskT>
174
+ __GPU_DEVICE__ int __reduce_add_sync(__MaskT __mask, int __val) {
175
+ return int(
176
+ __gpu_lane_add_u32((unsigned long long)__mask, (unsigned int)__val));
177
+ }
178
+ template <typename __MaskT>
179
+ __GPU_DEVICE__ unsigned int __reduce_min_sync(__MaskT __mask,
180
+ unsigned int __val) {
181
+ return __gpu_lane_min_u32((unsigned long long)__mask, __val);
182
+ }
183
+ template <typename __MaskT>
184
+ __GPU_DEVICE__ int __reduce_min_sync(__MaskT __mask, int __val) {
185
+ unsigned int __r = __gpu_lane_min_u32((unsigned long long)__mask,
186
+ (unsigned int)__val ^ 0x80000000u);
187
+ return int(__r ^ 0x80000000u);
188
+ }
189
+ template <typename __MaskT>
190
+ __GPU_DEVICE__ unsigned int __reduce_max_sync(__MaskT __mask,
191
+ unsigned int __val) {
192
+ return __gpu_lane_max_u32((unsigned long long)__mask, __val);
193
+ }
194
+ template <typename __MaskT>
195
+ __GPU_DEVICE__ int __reduce_max_sync(__MaskT __mask, int __val) {
196
+ unsigned int __r = __gpu_lane_max_u32((unsigned long long)__mask,
197
+ (unsigned int)__val ^ 0x80000000u);
198
+ return int(__r ^ 0x80000000u);
199
+ }
200
+ template <typename __MaskT>
201
+ __GPU_DEVICE__ unsigned int __reduce_and_sync(__MaskT __mask,
202
+ unsigned int __val) {
203
+ return __gpu_lane_and_u32((unsigned long long)__mask, __val);
204
+ }
205
+ template <typename __MaskT>
206
+ __GPU_DEVICE__ unsigned int __reduce_or_sync(__MaskT __mask,
207
+ unsigned int __val) {
208
+ return __gpu_lane_or_u32((unsigned long long)__mask, __val);
209
+ }
210
+ template <typename __MaskT>
211
+ __GPU_DEVICE__ unsigned int __reduce_xor_sync(__MaskT __mask,
212
+ unsigned int __val) {
213
+ return __gpu_lane_xor_u32((unsigned long long)__mask, __val);
214
+ }
215
+
216
+ //===----------------------------------------------------------------------===//
217
+ // Funnel shifts.
218
+ //===----------------------------------------------------------------------===//
219
+
220
+ __GPU_DEVICE__ unsigned int
221
+ __funnelshift_l(unsigned int __lo, unsigned int __hi, unsigned int __shift) {
222
+ unsigned int __s = __shift & 31u;
223
+ return (unsigned int)((((unsigned long long)__hi << 32 | __lo) << __s) >> 32);
224
+ }
225
+ __GPU_DEVICE__ unsigned int
226
+ __funnelshift_lc(unsigned int __lo, unsigned int __hi, unsigned int __shift) {
227
+ unsigned int __s = __shift >= 32u ? 32u : __shift;
228
+ return (unsigned int)((((unsigned long long)__hi << 32 | __lo) << __s) >> 32);
229
+ }
230
+ __GPU_DEVICE__ unsigned int
231
+ __funnelshift_r(unsigned int __lo, unsigned int __hi, unsigned int __shift) {
232
+ unsigned int __s = __shift & 31u;
233
+ return (unsigned int)(((unsigned long long)__hi << 32 | __lo) >> __s);
234
+ }
235
+ __GPU_DEVICE__ unsigned int
236
+ __funnelshift_rc(unsigned int __lo, unsigned int __hi, unsigned int __shift) {
237
+ unsigned int __s = __shift >= 32u ? 32u : __shift;
238
+ return (unsigned int)(((unsigned long long)__hi << 32 | __lo) >> __s);
239
+ }
240
+
241
+ #endif // device compile
242
+ #endif // __CLANG_GPU_INTRINSICS_H__