@cpp-linter/clang-tidy-darwin-arm64 20.1.8 → 21.1.8

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 (286) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy +2 -2
  3. package/lib/clang/{20 → 21}/include/__clang_cuda_intrinsics.h +287 -0
  4. package/lib/clang/{20 → 21}/include/__clang_cuda_runtime_wrapper.h +1 -0
  5. package/lib/clang/{20 → 21}/include/__clang_cuda_texture_intrinsics.h +437 -2
  6. package/lib/clang/{20 → 21}/include/__clang_hip_cmath.h +9 -8
  7. package/lib/clang/{20 → 21}/include/__clang_hip_libdevice_declares.h +12 -20
  8. package/lib/clang/{20 → 21}/include/__clang_hip_math.h +105 -29
  9. package/lib/clang/{20 → 21}/include/__clang_hip_runtime_wrapper.h +3 -0
  10. package/lib/clang/21/include/__clang_spirv_builtins.h +217 -0
  11. package/lib/clang/{20 → 21}/include/__stdarg_va_arg.h +2 -2
  12. package/lib/clang/{20 → 21}/include/altivec.h +82 -79
  13. package/lib/clang/{20 → 21}/include/amdgpuintrin.h +23 -26
  14. package/lib/clang/{20 → 21}/include/amxavx512intrin.h +1 -1
  15. package/lib/clang/{20 → 21}/include/amxcomplexintrin.h +4 -6
  16. package/lib/clang/{20 → 21}/include/amxmovrstransposeintrin.h +1 -1
  17. package/lib/clang/{20 → 21}/include/amxtf32transposeintrin.h +1 -1
  18. package/lib/clang/21/include/andes_vector.h +16 -0
  19. package/lib/clang/{20 → 21}/include/arm_acle.h +11 -41
  20. package/lib/clang/{20 → 21}/include/arm_fp16.h +89 -89
  21. package/lib/clang/{20 → 21}/include/arm_neon.h +22139 -19621
  22. package/lib/clang/{20 → 21}/include/arm_sme.h +694 -0
  23. package/lib/clang/{20 → 21}/include/arm_sve.h +5110 -4770
  24. package/lib/clang/{20 → 21}/include/avx10_2_512bf16intrin.h +8 -8
  25. package/lib/clang/{20 → 21}/include/avx10_2_512niintrin.h +6 -6
  26. package/lib/clang/{20 → 21}/include/avx10_2bf16intrin.h +34 -34
  27. package/lib/clang/21/include/avx10_2convertintrin.h +3257 -0
  28. package/lib/clang/{20 → 21}/include/avx10_2minmaxintrin.h +18 -18
  29. package/lib/clang/{20 → 21}/include/avx10_2niintrin.h +12 -12
  30. package/lib/clang/{20 → 21}/include/avx10_2satcvtdsintrin.h +48 -62
  31. package/lib/clang/{20 → 21}/include/avx10_2satcvtintrin.h +24 -44
  32. package/lib/clang/{20 → 21}/include/avx512fp16intrin.h +2 -1
  33. package/lib/clang/{20 → 21}/include/bmiintrin.h +0 -4
  34. package/lib/clang/{20 → 21}/include/cpuid.h +24 -22
  35. package/lib/clang/21/include/cuda_wrappers/bits/c++config.h +61 -0
  36. package/lib/clang/{20 → 21}/include/cuda_wrappers/cmath +0 -50
  37. package/lib/clang/{20 → 21}/include/float.h +2 -11
  38. package/lib/clang/{20 → 21}/include/gpuintrin.h +111 -7
  39. package/lib/clang/{20/include/hlsl/hlsl_intrinsics.h → 21/include/hlsl/hlsl_alias_intrinsics.h} +220 -223
  40. package/lib/clang/21/include/hlsl/hlsl_compat_overloads.h +427 -0
  41. package/lib/clang/21/include/hlsl/hlsl_detail.h +54 -0
  42. package/lib/clang/21/include/hlsl/hlsl_intrinsic_helpers.h +144 -0
  43. package/lib/clang/21/include/hlsl/hlsl_intrinsics.h +526 -0
  44. package/lib/clang/21/include/hlsl/hlsl_spirv.h +28 -0
  45. package/lib/clang/{20 → 21}/include/hlsl.h +12 -0
  46. package/lib/clang/{20 → 21}/include/immintrin.h +0 -224
  47. package/lib/clang/{20 → 21}/include/intrin.h +21 -4
  48. package/lib/clang/{20 → 21}/include/keylockerintrin.h +0 -9
  49. package/lib/clang/{20 → 21}/include/llvm_libc_wrappers/stdlib.h +1 -1
  50. package/lib/clang/{20 → 21}/include/lzcntintrin.h +6 -4
  51. package/lib/clang/{20 → 21}/include/module.modulemap +13 -0
  52. package/lib/clang/{20 → 21}/include/movrsintrin.h +1 -1
  53. package/lib/clang/{20 → 21}/include/nvptxintrin.h +48 -32
  54. package/lib/clang/{20 → 21}/include/opencl-c-base.h +19 -1
  55. package/lib/clang/{20 → 21}/include/opencl-c.h +298 -39
  56. package/lib/clang/{20 → 21}/include/prfchwintrin.h +10 -13
  57. package/lib/clang/{20 → 21}/include/ptrauth.h +59 -2
  58. package/lib/clang/{20 → 21}/include/riscv_corev_alu.h +4 -4
  59. package/lib/clang/{20 → 21}/include/riscv_vector.h +0 -4
  60. package/lib/clang/{20 → 21}/include/shaintrin.h +3 -2
  61. package/lib/clang/21/include/stdcountof.h +15 -0
  62. package/lib/clang/{20 → 21}/include/stdint.h +18 -129
  63. package/lib/clang/{20 → 21}/include/x86gprintrin.h +0 -14
  64. package/lib/clang/{20 → 21}/include/x86intrin.h +0 -18
  65. package/lib/clang/{20 → 21}/include/xmmintrin.h +3 -2
  66. package/package.json +6 -6
  67. package/lib/clang/20/include/avx10_2convertintrin.h +0 -577
  68. package/lib/clang/20/include/hlsl/hlsl_detail.h +0 -84
  69. /package/lib/clang/{20 → 21}/include/__clang_cuda_builtin_vars.h +0 -0
  70. /package/lib/clang/{20 → 21}/include/__clang_cuda_cmath.h +0 -0
  71. /package/lib/clang/{20 → 21}/include/__clang_cuda_complex_builtins.h +0 -0
  72. /package/lib/clang/{20 → 21}/include/__clang_cuda_device_functions.h +0 -0
  73. /package/lib/clang/{20 → 21}/include/__clang_cuda_libdevice_declares.h +0 -0
  74. /package/lib/clang/{20 → 21}/include/__clang_cuda_math.h +0 -0
  75. /package/lib/clang/{20 → 21}/include/__clang_cuda_math_forward_declares.h +0 -0
  76. /package/lib/clang/{20 → 21}/include/__clang_hip_stdlib.h +0 -0
  77. /package/lib/clang/{20 → 21}/include/__stdarg___gnuc_va_list.h +0 -0
  78. /package/lib/clang/{20 → 21}/include/__stdarg___va_copy.h +0 -0
  79. /package/lib/clang/{20 → 21}/include/__stdarg_header_macro.h +0 -0
  80. /package/lib/clang/{20 → 21}/include/__stdarg_va_copy.h +0 -0
  81. /package/lib/clang/{20 → 21}/include/__stdarg_va_list.h +0 -0
  82. /package/lib/clang/{20 → 21}/include/__stddef_header_macro.h +0 -0
  83. /package/lib/clang/{20 → 21}/include/__stddef_max_align_t.h +0 -0
  84. /package/lib/clang/{20 → 21}/include/__stddef_null.h +0 -0
  85. /package/lib/clang/{20 → 21}/include/__stddef_nullptr_t.h +0 -0
  86. /package/lib/clang/{20 → 21}/include/__stddef_offsetof.h +0 -0
  87. /package/lib/clang/{20 → 21}/include/__stddef_ptrdiff_t.h +0 -0
  88. /package/lib/clang/{20 → 21}/include/__stddef_rsize_t.h +0 -0
  89. /package/lib/clang/{20 → 21}/include/__stddef_size_t.h +0 -0
  90. /package/lib/clang/{20 → 21}/include/__stddef_unreachable.h +0 -0
  91. /package/lib/clang/{20 → 21}/include/__stddef_wchar_t.h +0 -0
  92. /package/lib/clang/{20 → 21}/include/__stddef_wint_t.h +0 -0
  93. /package/lib/clang/{20 → 21}/include/__wmmintrin_aes.h +0 -0
  94. /package/lib/clang/{20 → 21}/include/__wmmintrin_pclmul.h +0 -0
  95. /package/lib/clang/{20 → 21}/include/adcintrin.h +0 -0
  96. /package/lib/clang/{20 → 21}/include/adxintrin.h +0 -0
  97. /package/lib/clang/{20 → 21}/include/ammintrin.h +0 -0
  98. /package/lib/clang/{20 → 21}/include/amxbf16transposeintrin.h +0 -0
  99. /package/lib/clang/{20 → 21}/include/amxcomplextransposeintrin.h +0 -0
  100. /package/lib/clang/{20 → 21}/include/amxfp16intrin.h +0 -0
  101. /package/lib/clang/{20 → 21}/include/amxfp16transposeintrin.h +0 -0
  102. /package/lib/clang/{20 → 21}/include/amxfp8intrin.h +0 -0
  103. /package/lib/clang/{20 → 21}/include/amxintrin.h +0 -0
  104. /package/lib/clang/{20 → 21}/include/amxmovrsintrin.h +0 -0
  105. /package/lib/clang/{20 → 21}/include/amxtf32intrin.h +0 -0
  106. /package/lib/clang/{20 → 21}/include/amxtransposeintrin.h +0 -0
  107. /package/lib/clang/{20 → 21}/include/arm64intr.h +0 -0
  108. /package/lib/clang/{20 → 21}/include/arm_bf16.h +0 -0
  109. /package/lib/clang/{20 → 21}/include/arm_cde.h +0 -0
  110. /package/lib/clang/{20 → 21}/include/arm_cmse.h +0 -0
  111. /package/lib/clang/{20 → 21}/include/arm_mve.h +0 -0
  112. /package/lib/clang/{20 → 21}/include/arm_neon_sve_bridge.h +0 -0
  113. /package/lib/clang/{20 → 21}/include/arm_vector_types.h +0 -0
  114. /package/lib/clang/{20 → 21}/include/armintr.h +0 -0
  115. /package/lib/clang/{20 → 21}/include/avx10_2_512convertintrin.h +0 -0
  116. /package/lib/clang/{20 → 21}/include/avx10_2_512minmaxintrin.h +0 -0
  117. /package/lib/clang/{20 → 21}/include/avx10_2_512satcvtdsintrin.h +0 -0
  118. /package/lib/clang/{20 → 21}/include/avx10_2_512satcvtintrin.h +0 -0
  119. /package/lib/clang/{20 → 21}/include/avx10_2copyintrin.h +0 -0
  120. /package/lib/clang/{20 → 21}/include/avx2intrin.h +0 -0
  121. /package/lib/clang/{20 → 21}/include/avx512bf16intrin.h +0 -0
  122. /package/lib/clang/{20 → 21}/include/avx512bitalgintrin.h +0 -0
  123. /package/lib/clang/{20 → 21}/include/avx512bwintrin.h +0 -0
  124. /package/lib/clang/{20 → 21}/include/avx512cdintrin.h +0 -0
  125. /package/lib/clang/{20 → 21}/include/avx512dqintrin.h +0 -0
  126. /package/lib/clang/{20 → 21}/include/avx512fintrin.h +0 -0
  127. /package/lib/clang/{20 → 21}/include/avx512ifmaintrin.h +0 -0
  128. /package/lib/clang/{20 → 21}/include/avx512ifmavlintrin.h +0 -0
  129. /package/lib/clang/{20 → 21}/include/avx512vbmi2intrin.h +0 -0
  130. /package/lib/clang/{20 → 21}/include/avx512vbmiintrin.h +0 -0
  131. /package/lib/clang/{20 → 21}/include/avx512vbmivlintrin.h +0 -0
  132. /package/lib/clang/{20 → 21}/include/avx512vlbf16intrin.h +0 -0
  133. /package/lib/clang/{20 → 21}/include/avx512vlbitalgintrin.h +0 -0
  134. /package/lib/clang/{20 → 21}/include/avx512vlbwintrin.h +0 -0
  135. /package/lib/clang/{20 → 21}/include/avx512vlcdintrin.h +0 -0
  136. /package/lib/clang/{20 → 21}/include/avx512vldqintrin.h +0 -0
  137. /package/lib/clang/{20 → 21}/include/avx512vlfp16intrin.h +0 -0
  138. /package/lib/clang/{20 → 21}/include/avx512vlintrin.h +0 -0
  139. /package/lib/clang/{20 → 21}/include/avx512vlvbmi2intrin.h +0 -0
  140. /package/lib/clang/{20 → 21}/include/avx512vlvnniintrin.h +0 -0
  141. /package/lib/clang/{20 → 21}/include/avx512vlvp2intersectintrin.h +0 -0
  142. /package/lib/clang/{20 → 21}/include/avx512vnniintrin.h +0 -0
  143. /package/lib/clang/{20 → 21}/include/avx512vp2intersectintrin.h +0 -0
  144. /package/lib/clang/{20 → 21}/include/avx512vpopcntdqintrin.h +0 -0
  145. /package/lib/clang/{20 → 21}/include/avx512vpopcntdqvlintrin.h +0 -0
  146. /package/lib/clang/{20 → 21}/include/avxifmaintrin.h +0 -0
  147. /package/lib/clang/{20 → 21}/include/avxintrin.h +0 -0
  148. /package/lib/clang/{20 → 21}/include/avxneconvertintrin.h +0 -0
  149. /package/lib/clang/{20 → 21}/include/avxvnniint16intrin.h +0 -0
  150. /package/lib/clang/{20 → 21}/include/avxvnniint8intrin.h +0 -0
  151. /package/lib/clang/{20 → 21}/include/avxvnniintrin.h +0 -0
  152. /package/lib/clang/{20 → 21}/include/bmi2intrin.h +0 -0
  153. /package/lib/clang/{20 → 21}/include/builtins.h +0 -0
  154. /package/lib/clang/{20 → 21}/include/cet.h +0 -0
  155. /package/lib/clang/{20 → 21}/include/cetintrin.h +0 -0
  156. /package/lib/clang/{20 → 21}/include/cldemoteintrin.h +0 -0
  157. /package/lib/clang/{20 → 21}/include/clflushoptintrin.h +0 -0
  158. /package/lib/clang/{20 → 21}/include/clwbintrin.h +0 -0
  159. /package/lib/clang/{20 → 21}/include/clzerointrin.h +0 -0
  160. /package/lib/clang/{20 → 21}/include/cmpccxaddintrin.h +0 -0
  161. /package/lib/clang/{20 → 21}/include/crc32intrin.h +0 -0
  162. /package/lib/clang/{20 → 21}/include/cuda_wrappers/algorithm +0 -0
  163. /package/lib/clang/{20 → 21}/include/cuda_wrappers/bits/basic_string.h +0 -0
  164. /package/lib/clang/{20 → 21}/include/cuda_wrappers/bits/basic_string.tcc +0 -0
  165. /package/lib/clang/{20 → 21}/include/cuda_wrappers/bits/shared_ptr_base.h +0 -0
  166. /package/lib/clang/{20 → 21}/include/cuda_wrappers/complex +0 -0
  167. /package/lib/clang/{20 → 21}/include/cuda_wrappers/new +0 -0
  168. /package/lib/clang/{20 → 21}/include/emmintrin.h +0 -0
  169. /package/lib/clang/{20 → 21}/include/enqcmdintrin.h +0 -0
  170. /package/lib/clang/{20 → 21}/include/f16cintrin.h +0 -0
  171. /package/lib/clang/{20 → 21}/include/fma4intrin.h +0 -0
  172. /package/lib/clang/{20 → 21}/include/fmaintrin.h +0 -0
  173. /package/lib/clang/{20 → 21}/include/fxsrintrin.h +0 -0
  174. /package/lib/clang/{20 → 21}/include/gfniintrin.h +0 -0
  175. /package/lib/clang/{20 → 21}/include/hexagon_circ_brev_intrinsics.h +0 -0
  176. /package/lib/clang/{20 → 21}/include/hexagon_protos.h +0 -0
  177. /package/lib/clang/{20 → 21}/include/hexagon_types.h +0 -0
  178. /package/lib/clang/{20 → 21}/include/hlsl/hlsl_basic_types.h +0 -0
  179. /package/lib/clang/{20 → 21}/include/hresetintrin.h +0 -0
  180. /package/lib/clang/{20 → 21}/include/htmintrin.h +0 -0
  181. /package/lib/clang/{20 → 21}/include/htmxlintrin.h +0 -0
  182. /package/lib/clang/{20 → 21}/include/hvx_hexagon_protos.h +0 -0
  183. /package/lib/clang/{20 → 21}/include/ia32intrin.h +0 -0
  184. /package/lib/clang/{20 → 21}/include/intrin0.h +0 -0
  185. /package/lib/clang/{20 → 21}/include/inttypes.h +0 -0
  186. /package/lib/clang/{20 → 21}/include/invpcidintrin.h +0 -0
  187. /package/lib/clang/{20 → 21}/include/iso646.h +0 -0
  188. /package/lib/clang/{20 → 21}/include/larchintrin.h +0 -0
  189. /package/lib/clang/{20 → 21}/include/lasxintrin.h +0 -0
  190. /package/lib/clang/{20 → 21}/include/limits.h +0 -0
  191. /package/lib/clang/{20 → 21}/include/llvm_libc_wrappers/assert.h +0 -0
  192. /package/lib/clang/{20 → 21}/include/llvm_libc_wrappers/ctype.h +0 -0
  193. /package/lib/clang/{20 → 21}/include/llvm_libc_wrappers/inttypes.h +0 -0
  194. /package/lib/clang/{20 → 21}/include/llvm_libc_wrappers/stdio.h +0 -0
  195. /package/lib/clang/{20 → 21}/include/llvm_libc_wrappers/string.h +0 -0
  196. /package/lib/clang/{20 → 21}/include/llvm_libc_wrappers/time.h +0 -0
  197. /package/lib/clang/{20 → 21}/include/llvm_offload_wrappers/__llvm_offload.h +0 -0
  198. /package/lib/clang/{20 → 21}/include/llvm_offload_wrappers/__llvm_offload_device.h +0 -0
  199. /package/lib/clang/{20 → 21}/include/llvm_offload_wrappers/__llvm_offload_host.h +0 -0
  200. /package/lib/clang/{20 → 21}/include/lsxintrin.h +0 -0
  201. /package/lib/clang/{20 → 21}/include/lwpintrin.h +0 -0
  202. /package/lib/clang/{20 → 21}/include/mm3dnow.h +0 -0
  203. /package/lib/clang/{20 → 21}/include/mm_malloc.h +0 -0
  204. /package/lib/clang/{20 → 21}/include/mmintrin.h +0 -0
  205. /package/lib/clang/{20 → 21}/include/movdirintrin.h +0 -0
  206. /package/lib/clang/{20 → 21}/include/movrs_avx10_2_512intrin.h +0 -0
  207. /package/lib/clang/{20 → 21}/include/movrs_avx10_2intrin.h +0 -0
  208. /package/lib/clang/{20 → 21}/include/msa.h +0 -0
  209. /package/lib/clang/{20 → 21}/include/mwaitxintrin.h +0 -0
  210. /package/lib/clang/{20 → 21}/include/nmmintrin.h +0 -0
  211. /package/lib/clang/{20 → 21}/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -0
  212. /package/lib/clang/{20 → 21}/include/openmp_wrappers/cmath +0 -0
  213. /package/lib/clang/{20 → 21}/include/openmp_wrappers/complex +0 -0
  214. /package/lib/clang/{20 → 21}/include/openmp_wrappers/complex.h +0 -0
  215. /package/lib/clang/{20 → 21}/include/openmp_wrappers/complex_cmath.h +0 -0
  216. /package/lib/clang/{20 → 21}/include/openmp_wrappers/math.h +0 -0
  217. /package/lib/clang/{20 → 21}/include/openmp_wrappers/new +0 -0
  218. /package/lib/clang/{20 → 21}/include/pconfigintrin.h +0 -0
  219. /package/lib/clang/{20 → 21}/include/pkuintrin.h +0 -0
  220. /package/lib/clang/{20 → 21}/include/pmmintrin.h +0 -0
  221. /package/lib/clang/{20 → 21}/include/popcntintrin.h +0 -0
  222. /package/lib/clang/{20 → 21}/include/ppc_wrappers/bmi2intrin.h +0 -0
  223. /package/lib/clang/{20 → 21}/include/ppc_wrappers/bmiintrin.h +0 -0
  224. /package/lib/clang/{20 → 21}/include/ppc_wrappers/emmintrin.h +0 -0
  225. /package/lib/clang/{20 → 21}/include/ppc_wrappers/immintrin.h +0 -0
  226. /package/lib/clang/{20 → 21}/include/ppc_wrappers/mm_malloc.h +0 -0
  227. /package/lib/clang/{20 → 21}/include/ppc_wrappers/mmintrin.h +0 -0
  228. /package/lib/clang/{20 → 21}/include/ppc_wrappers/nmmintrin.h +0 -0
  229. /package/lib/clang/{20 → 21}/include/ppc_wrappers/pmmintrin.h +0 -0
  230. /package/lib/clang/{20 → 21}/include/ppc_wrappers/smmintrin.h +0 -0
  231. /package/lib/clang/{20 → 21}/include/ppc_wrappers/tmmintrin.h +0 -0
  232. /package/lib/clang/{20 → 21}/include/ppc_wrappers/x86gprintrin.h +0 -0
  233. /package/lib/clang/{20 → 21}/include/ppc_wrappers/x86intrin.h +0 -0
  234. /package/lib/clang/{20 → 21}/include/ppc_wrappers/xmmintrin.h +0 -0
  235. /package/lib/clang/{20 → 21}/include/prfchiintrin.h +0 -0
  236. /package/lib/clang/{20 → 21}/include/ptwriteintrin.h +0 -0
  237. /package/lib/clang/{20 → 21}/include/raointintrin.h +0 -0
  238. /package/lib/clang/{20 → 21}/include/rdpruintrin.h +0 -0
  239. /package/lib/clang/{20 → 21}/include/rdseedintrin.h +0 -0
  240. /package/lib/clang/{20 → 21}/include/riscv_bitmanip.h +0 -0
  241. /package/lib/clang/{20 → 21}/include/riscv_crypto.h +0 -0
  242. /package/lib/clang/{20 → 21}/include/riscv_ntlh.h +0 -0
  243. /package/lib/clang/{20 → 21}/include/rtmintrin.h +0 -0
  244. /package/lib/clang/{20 → 21}/include/s390intrin.h +0 -0
  245. /package/lib/clang/{20 → 21}/include/serializeintrin.h +0 -0
  246. /package/lib/clang/{20 → 21}/include/sgxintrin.h +0 -0
  247. /package/lib/clang/{20 → 21}/include/sha512intrin.h +0 -0
  248. /package/lib/clang/{20 → 21}/include/sifive_vector.h +0 -0
  249. /package/lib/clang/{20 → 21}/include/sm3intrin.h +0 -0
  250. /package/lib/clang/{20 → 21}/include/sm4evexintrin.h +0 -0
  251. /package/lib/clang/{20 → 21}/include/sm4intrin.h +0 -0
  252. /package/lib/clang/{20 → 21}/include/smmintrin.h +0 -0
  253. /package/lib/clang/{20 → 21}/include/stdalign.h +0 -0
  254. /package/lib/clang/{20 → 21}/include/stdarg.h +0 -0
  255. /package/lib/clang/{20 → 21}/include/stdatomic.h +0 -0
  256. /package/lib/clang/{20 → 21}/include/stdbool.h +0 -0
  257. /package/lib/clang/{20 → 21}/include/stdckdint.h +0 -0
  258. /package/lib/clang/{20 → 21}/include/stddef.h +0 -0
  259. /package/lib/clang/{20 → 21}/include/stdnoreturn.h +0 -0
  260. /package/lib/clang/{20 → 21}/include/tbmintrin.h +0 -0
  261. /package/lib/clang/{20 → 21}/include/tgmath.h +0 -0
  262. /package/lib/clang/{20 → 21}/include/tmmintrin.h +0 -0
  263. /package/lib/clang/{20 → 21}/include/tsxldtrkintrin.h +0 -0
  264. /package/lib/clang/{20 → 21}/include/uintrintrin.h +0 -0
  265. /package/lib/clang/{20 → 21}/include/unwind.h +0 -0
  266. /package/lib/clang/{20 → 21}/include/usermsrintrin.h +0 -0
  267. /package/lib/clang/{20 → 21}/include/vadefs.h +0 -0
  268. /package/lib/clang/{20 → 21}/include/vaesintrin.h +0 -0
  269. /package/lib/clang/{20 → 21}/include/varargs.h +0 -0
  270. /package/lib/clang/{20 → 21}/include/vecintrin.h +0 -0
  271. /package/lib/clang/{20 → 21}/include/velintrin.h +0 -0
  272. /package/lib/clang/{20 → 21}/include/velintrin_approx.h +0 -0
  273. /package/lib/clang/{20 → 21}/include/velintrin_gen.h +0 -0
  274. /package/lib/clang/{20 → 21}/include/vpclmulqdqintrin.h +0 -0
  275. /package/lib/clang/{20 → 21}/include/waitpkgintrin.h +0 -0
  276. /package/lib/clang/{20 → 21}/include/wasm_simd128.h +0 -0
  277. /package/lib/clang/{20 → 21}/include/wbnoinvdintrin.h +0 -0
  278. /package/lib/clang/{20 → 21}/include/wmmintrin.h +0 -0
  279. /package/lib/clang/{20 → 21}/include/xopintrin.h +0 -0
  280. /package/lib/clang/{20 → 21}/include/xsavecintrin.h +0 -0
  281. /package/lib/clang/{20 → 21}/include/xsaveintrin.h +0 -0
  282. /package/lib/clang/{20 → 21}/include/xsaveoptintrin.h +0 -0
  283. /package/lib/clang/{20 → 21}/include/xsavesintrin.h +0 -0
  284. /package/lib/clang/{20 → 21}/include/xtestintrin.h +0 -0
  285. /package/lib/clang/{20 → 21}/include/yvals_core.h +0 -0
  286. /package/lib/clang/{20 → 21}/include/zos_wrappers/builtins.h +0 -0
@@ -0,0 +1,427 @@
1
+ //===--- hlsl_compat_overloads.h - Extra HLSL overloads for 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 _HLSL_COMPAT_OVERLOADS_H_
10
+ #define _HLSl_COMPAT_OVERLOADS_H_
11
+
12
+ namespace hlsl {
13
+
14
+ // Note: Functions in this file are sorted alphabetically, then grouped by base
15
+ // element type, and the element types are sorted by size, then singed integer,
16
+ // unsigned integer and floating point. Keeping this ordering consistent will
17
+ // help keep this file manageable as it grows.
18
+
19
+ #define _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(fn) \
20
+ constexpr float fn(double V) { return fn((float)V); } \
21
+ constexpr float2 fn(double2 V) { return fn((float2)V); } \
22
+ constexpr float3 fn(double3 V) { return fn((float3)V); } \
23
+ constexpr float4 fn(double4 V) { return fn((float4)V); }
24
+
25
+ #define _DXC_COMPAT_BINARY_DOUBLE_OVERLOADS(fn) \
26
+ constexpr float fn(double V1, double V2) { \
27
+ return fn((float)V1, (float)V2); \
28
+ } \
29
+ constexpr float2 fn(double2 V1, double2 V2) { \
30
+ return fn((float2)V1, (float2)V2); \
31
+ } \
32
+ constexpr float3 fn(double3 V1, double3 V2) { \
33
+ return fn((float3)V1, (float3)V2); \
34
+ } \
35
+ constexpr float4 fn(double4 V1, double4 V2) { \
36
+ return fn((float4)V1, (float4)V2); \
37
+ }
38
+
39
+ #define _DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(fn) \
40
+ constexpr float fn(double V1, double V2, double V3) { \
41
+ return fn((float)V1, (float)V2, (float)V3); \
42
+ } \
43
+ constexpr float2 fn(double2 V1, double2 V2, double2 V3) { \
44
+ return fn((float2)V1, (float2)V2, (float2)V3); \
45
+ } \
46
+ constexpr float3 fn(double3 V1, double3 V2, double3 V3) { \
47
+ return fn((float3)V1, (float3)V2, (float3)V3); \
48
+ } \
49
+ constexpr float4 fn(double4 V1, double4 V2, double4 V3) { \
50
+ return fn((float4)V1, (float4)V2, (float4)V3); \
51
+ }
52
+
53
+ #define _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(fn) \
54
+ constexpr float fn(int V) { return fn((float)V); } \
55
+ constexpr float2 fn(int2 V) { return fn((float2)V); } \
56
+ constexpr float3 fn(int3 V) { return fn((float3)V); } \
57
+ constexpr float4 fn(int4 V) { return fn((float4)V); } \
58
+ constexpr float fn(uint V) { return fn((float)V); } \
59
+ constexpr float2 fn(uint2 V) { return fn((float2)V); } \
60
+ constexpr float3 fn(uint3 V) { return fn((float3)V); } \
61
+ constexpr float4 fn(uint4 V) { return fn((float4)V); } \
62
+ constexpr float fn(int64_t V) { return fn((float)V); } \
63
+ constexpr float2 fn(int64_t2 V) { return fn((float2)V); } \
64
+ constexpr float3 fn(int64_t3 V) { return fn((float3)V); } \
65
+ constexpr float4 fn(int64_t4 V) { return fn((float4)V); } \
66
+ constexpr float fn(uint64_t V) { return fn((float)V); } \
67
+ constexpr float2 fn(uint64_t2 V) { return fn((float2)V); } \
68
+ constexpr float3 fn(uint64_t3 V) { return fn((float3)V); } \
69
+ constexpr float4 fn(uint64_t4 V) { return fn((float4)V); }
70
+
71
+ #define _DXC_COMPAT_BINARY_INTEGER_OVERLOADS(fn) \
72
+ constexpr float fn(int V1, int V2) { return fn((float)V1, (float)V2); } \
73
+ constexpr float2 fn(int2 V1, int2 V2) { return fn((float2)V1, (float2)V2); } \
74
+ constexpr float3 fn(int3 V1, int3 V2) { return fn((float3)V1, (float3)V2); } \
75
+ constexpr float4 fn(int4 V1, int4 V2) { return fn((float4)V1, (float4)V2); } \
76
+ constexpr float fn(uint V1, uint V2) { return fn((float)V1, (float)V2); } \
77
+ constexpr float2 fn(uint2 V1, uint2 V2) { \
78
+ return fn((float2)V1, (float2)V2); \
79
+ } \
80
+ constexpr float3 fn(uint3 V1, uint3 V2) { \
81
+ return fn((float3)V1, (float3)V2); \
82
+ } \
83
+ constexpr float4 fn(uint4 V1, uint4 V2) { \
84
+ return fn((float4)V1, (float4)V2); \
85
+ } \
86
+ constexpr float fn(int64_t V1, int64_t V2) { \
87
+ return fn((float)V1, (float)V2); \
88
+ } \
89
+ constexpr float2 fn(int64_t2 V1, int64_t2 V2) { \
90
+ return fn((float2)V1, (float2)V2); \
91
+ } \
92
+ constexpr float3 fn(int64_t3 V1, int64_t3 V2) { \
93
+ return fn((float3)V1, (float3)V2); \
94
+ } \
95
+ constexpr float4 fn(int64_t4 V1, int64_t4 V2) { \
96
+ return fn((float4)V1, (float4)V2); \
97
+ } \
98
+ constexpr float fn(uint64_t V1, uint64_t V2) { \
99
+ return fn((float)V1, (float)V2); \
100
+ } \
101
+ constexpr float2 fn(uint64_t2 V1, uint64_t2 V2) { \
102
+ return fn((float2)V1, (float2)V2); \
103
+ } \
104
+ constexpr float3 fn(uint64_t3 V1, uint64_t3 V2) { \
105
+ return fn((float3)V1, (float3)V2); \
106
+ } \
107
+ constexpr float4 fn(uint64_t4 V1, uint64_t4 V2) { \
108
+ return fn((float4)V1, (float4)V2); \
109
+ }
110
+
111
+ #define _DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(fn) \
112
+ constexpr float fn(int V1, int V2, int V3) { \
113
+ return fn((float)V1, (float)V2, (float)V3); \
114
+ } \
115
+ constexpr float2 fn(int2 V1, int2 V2, int2 V3) { \
116
+ return fn((float2)V1, (float2)V2, (float2)V3); \
117
+ } \
118
+ constexpr float3 fn(int3 V1, int3 V2, int3 V3) { \
119
+ return fn((float3)V1, (float3)V2, (float3)V3); \
120
+ } \
121
+ constexpr float4 fn(int4 V1, int4 V2, int4 V3) { \
122
+ return fn((float4)V1, (float4)V2, (float4)V3); \
123
+ } \
124
+ constexpr float fn(uint V1, uint V2, uint V3) { \
125
+ return fn((float)V1, (float)V2, (float)V3); \
126
+ } \
127
+ constexpr float2 fn(uint2 V1, uint2 V2, uint2 V3) { \
128
+ return fn((float2)V1, (float2)V2, (float2)V3); \
129
+ } \
130
+ constexpr float3 fn(uint3 V1, uint3 V2, uint3 V3) { \
131
+ return fn((float3)V1, (float3)V2, (float3)V3); \
132
+ } \
133
+ constexpr float4 fn(uint4 V1, uint4 V2, uint4 V3) { \
134
+ return fn((float4)V1, (float4)V2, (float4)V3); \
135
+ } \
136
+ constexpr float fn(int64_t V1, int64_t V2, int64_t V3) { \
137
+ return fn((float)V1, (float)V2, (float)V3); \
138
+ } \
139
+ constexpr float2 fn(int64_t2 V1, int64_t2 V2, int64_t2 V3) { \
140
+ return fn((float2)V1, (float2)V2, (float2)V3); \
141
+ } \
142
+ constexpr float3 fn(int64_t3 V1, int64_t3 V2, int64_t3 V3) { \
143
+ return fn((float3)V1, (float3)V2, (float3)V3); \
144
+ } \
145
+ constexpr float4 fn(int64_t4 V1, int64_t4 V2, int64_t4 V3) { \
146
+ return fn((float4)V1, (float4)V2, (float4)V3); \
147
+ } \
148
+ constexpr float fn(uint64_t V1, uint64_t V2, uint64_t V3) { \
149
+ return fn((float)V1, (float)V2, (float)V3); \
150
+ } \
151
+ constexpr float2 fn(uint64_t2 V1, uint64_t2 V2, uint64_t2 V3) { \
152
+ return fn((float2)V1, (float2)V2, (float2)V3); \
153
+ } \
154
+ constexpr float3 fn(uint64_t3 V1, uint64_t3 V2, uint64_t3 V3) { \
155
+ return fn((float3)V1, (float3)V2, (float3)V3); \
156
+ } \
157
+ constexpr float4 fn(uint64_t4 V1, uint64_t4 V2, uint64_t4 V3) { \
158
+ return fn((float4)V1, (float4)V2, (float4)V3); \
159
+ }
160
+
161
+ //===----------------------------------------------------------------------===//
162
+ // acos builtins overloads
163
+ //===----------------------------------------------------------------------===//
164
+
165
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(acos)
166
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(acos)
167
+
168
+ //===----------------------------------------------------------------------===//
169
+ // asin builtins overloads
170
+ //===----------------------------------------------------------------------===//
171
+
172
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(asin)
173
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(asin)
174
+
175
+ //===----------------------------------------------------------------------===//
176
+ // atan builtins overloads
177
+ //===----------------------------------------------------------------------===//
178
+
179
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(atan)
180
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(atan)
181
+
182
+ //===----------------------------------------------------------------------===//
183
+ // atan2 builtins overloads
184
+ //===----------------------------------------------------------------------===//
185
+
186
+ _DXC_COMPAT_BINARY_DOUBLE_OVERLOADS(atan2)
187
+ _DXC_COMPAT_BINARY_INTEGER_OVERLOADS(atan2)
188
+
189
+ //===----------------------------------------------------------------------===//
190
+ // ceil builtins overloads
191
+ //===----------------------------------------------------------------------===//
192
+
193
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(ceil)
194
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(ceil)
195
+
196
+ //===----------------------------------------------------------------------===//
197
+ // clamp builtins overloads
198
+ //===----------------------------------------------------------------------===//
199
+
200
+ template <typename T, uint N>
201
+ constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector<T, N>>
202
+ clamp(vector<T, N> p0, vector<T, N> p1, T p2) {
203
+ return clamp(p0, p1, (vector<T, N>)p2);
204
+ }
205
+
206
+ template <typename T, uint N>
207
+ constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector<T, N>>
208
+ clamp(vector<T, N> p0, T p1, vector<T, N> p2) {
209
+ return clamp(p0, (vector<T, N>)p1, p2);
210
+ }
211
+
212
+ template <typename T, uint N>
213
+ constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector<T, N>>
214
+ clamp(vector<T, N> p0, T p1, T p2) {
215
+ return clamp(p0, (vector<T, N>)p1, (vector<T, N>)p2);
216
+ }
217
+
218
+ //===----------------------------------------------------------------------===//
219
+ // cos builtins overloads
220
+ //===----------------------------------------------------------------------===//
221
+
222
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(cos)
223
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(cos)
224
+
225
+ //===----------------------------------------------------------------------===//
226
+ // cosh builtins overloads
227
+ //===----------------------------------------------------------------------===//
228
+
229
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(cosh)
230
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(cosh)
231
+
232
+ //===----------------------------------------------------------------------===//
233
+ // degrees builtins overloads
234
+ //===----------------------------------------------------------------------===//
235
+
236
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(degrees)
237
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(degrees)
238
+
239
+ //===----------------------------------------------------------------------===//
240
+ // exp builtins overloads
241
+ //===----------------------------------------------------------------------===//
242
+
243
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(exp)
244
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(exp)
245
+
246
+ //===----------------------------------------------------------------------===//
247
+ // exp2 builtins overloads
248
+ //===----------------------------------------------------------------------===//
249
+
250
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(exp2)
251
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(exp2)
252
+
253
+ //===----------------------------------------------------------------------===//
254
+ // floor builtins overloads
255
+ //===----------------------------------------------------------------------===//
256
+
257
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(floor)
258
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(floor)
259
+
260
+ //===----------------------------------------------------------------------===//
261
+ // frac builtins overloads
262
+ //===----------------------------------------------------------------------===//
263
+
264
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(frac)
265
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(frac)
266
+
267
+ //===----------------------------------------------------------------------===//
268
+ // isinf builtins overloads
269
+ //===----------------------------------------------------------------------===//
270
+
271
+ constexpr bool isinf(double V) { return isinf((float)V); }
272
+ constexpr bool2 isinf(double2 V) { return isinf((float2)V); }
273
+ constexpr bool3 isinf(double3 V) { return isinf((float3)V); }
274
+ constexpr bool4 isinf(double4 V) { return isinf((float4)V); }
275
+
276
+ //===----------------------------------------------------------------------===//
277
+ // lerp builtins overloads
278
+ //===----------------------------------------------------------------------===//
279
+
280
+ template <typename T, uint N>
281
+ constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector<T, N>>
282
+ lerp(vector<T, N> x, vector<T, N> y, T s) {
283
+ return lerp(x, y, (vector<T, N>)s);
284
+ }
285
+
286
+ _DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp)
287
+ _DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp)
288
+
289
+ //===----------------------------------------------------------------------===//
290
+ // log builtins overloads
291
+ //===----------------------------------------------------------------------===//
292
+
293
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(log)
294
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(log)
295
+
296
+ //===----------------------------------------------------------------------===//
297
+ // log10 builtins overloads
298
+ //===----------------------------------------------------------------------===//
299
+
300
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(log10)
301
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(log10)
302
+
303
+ //===----------------------------------------------------------------------===//
304
+ // log2 builtins overloads
305
+ //===----------------------------------------------------------------------===//
306
+
307
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(log2)
308
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(log2)
309
+
310
+ //===----------------------------------------------------------------------===//
311
+ // max builtins overloads
312
+ //===----------------------------------------------------------------------===//
313
+
314
+ template <typename T, uint N>
315
+ constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector<T, N>>
316
+ max(vector<T, N> p0, T p1) {
317
+ return max(p0, (vector<T, N>)p1);
318
+ }
319
+
320
+ template <typename T, uint N>
321
+ constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector<T, N>>
322
+ max(T p0, vector<T, N> p1) {
323
+ return max((vector<T, N>)p0, p1);
324
+ }
325
+
326
+ //===----------------------------------------------------------------------===//
327
+ // min builtins overloads
328
+ //===----------------------------------------------------------------------===//
329
+
330
+ template <typename T, uint N>
331
+ constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector<T, N>>
332
+ min(vector<T, N> p0, T p1) {
333
+ return min(p0, (vector<T, N>)p1);
334
+ }
335
+
336
+ template <typename T, uint N>
337
+ constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector<T, N>>
338
+ min(T p0, vector<T, N> p1) {
339
+ return min((vector<T, N>)p0, p1);
340
+ }
341
+
342
+ //===----------------------------------------------------------------------===//
343
+ // normalize builtins overloads
344
+ //===----------------------------------------------------------------------===//
345
+
346
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(normalize)
347
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(normalize)
348
+
349
+ //===----------------------------------------------------------------------===//
350
+ // pow builtins overloads
351
+ //===----------------------------------------------------------------------===//
352
+
353
+ _DXC_COMPAT_BINARY_DOUBLE_OVERLOADS(pow)
354
+ _DXC_COMPAT_BINARY_INTEGER_OVERLOADS(pow)
355
+
356
+ //===----------------------------------------------------------------------===//
357
+ // rsqrt builtins overloads
358
+ //===----------------------------------------------------------------------===//
359
+
360
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(rsqrt)
361
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(rsqrt)
362
+
363
+ //===----------------------------------------------------------------------===//
364
+ // round builtins overloads
365
+ //===----------------------------------------------------------------------===//
366
+
367
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(round)
368
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(round)
369
+
370
+ //===----------------------------------------------------------------------===//
371
+ // sin builtins overloads
372
+ //===----------------------------------------------------------------------===//
373
+
374
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(sin)
375
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(sin)
376
+
377
+ //===----------------------------------------------------------------------===//
378
+ // sinh builtins overloads
379
+ //===----------------------------------------------------------------------===//
380
+
381
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(sinh)
382
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(sinh)
383
+
384
+ //===----------------------------------------------------------------------===//
385
+ // sqrt builtins overloads
386
+ //===----------------------------------------------------------------------===//
387
+
388
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(sqrt)
389
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(sqrt)
390
+
391
+ //===----------------------------------------------------------------------===//
392
+ // step builtins overloads
393
+ //===----------------------------------------------------------------------===//
394
+
395
+ _DXC_COMPAT_BINARY_DOUBLE_OVERLOADS(step)
396
+ _DXC_COMPAT_BINARY_INTEGER_OVERLOADS(step)
397
+
398
+ //===----------------------------------------------------------------------===//
399
+ // tan builtins overloads
400
+ //===----------------------------------------------------------------------===//
401
+
402
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(tan)
403
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(tan)
404
+
405
+ //===----------------------------------------------------------------------===//
406
+ // tanh builtins overloads
407
+ //===----------------------------------------------------------------------===//
408
+
409
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(tanh)
410
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(tanh)
411
+
412
+ //===----------------------------------------------------------------------===//
413
+ // trunc builtins overloads
414
+ //===----------------------------------------------------------------------===//
415
+
416
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(trunc)
417
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(trunc)
418
+
419
+ //===----------------------------------------------------------------------===//
420
+ // radians builtins overloads
421
+ //===----------------------------------------------------------------------===//
422
+
423
+ _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(radians)
424
+ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(radians)
425
+
426
+ } // namespace hlsl
427
+ #endif // _HLSL_COMPAT_OVERLOADS_H_
@@ -0,0 +1,54 @@
1
+ //===----- hlsl_detail.h - HLSL definitions for 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 _HLSL_HLSL_DETAILS_H_
10
+ #define _HLSL_HLSL_DETAILS_H_
11
+
12
+ namespace hlsl {
13
+
14
+ namespace __detail {
15
+
16
+ template <typename T, typename U> struct is_same {
17
+ static const bool value = false;
18
+ };
19
+
20
+ template <typename T> struct is_same<T, T> {
21
+ static const bool value = true;
22
+ };
23
+
24
+ template <bool B, typename T> struct enable_if {};
25
+
26
+ template <typename T> struct enable_if<true, T> {
27
+ using Type = T;
28
+ };
29
+
30
+ template <bool B, class T = void>
31
+ using enable_if_t = typename enable_if<B, T>::Type;
32
+
33
+ template <typename U, typename T, int N>
34
+ constexpr enable_if_t<sizeof(U) == sizeof(T), vector<U, N>>
35
+ bit_cast(vector<T, N> V) {
36
+ return __builtin_bit_cast(vector<U, N>, V);
37
+ }
38
+
39
+ template <typename U, typename T>
40
+ constexpr enable_if_t<sizeof(U) == sizeof(T), U> bit_cast(T F) {
41
+ return __builtin_bit_cast(U, F);
42
+ }
43
+
44
+ template <typename T> struct is_arithmetic {
45
+ static const bool Value = __is_arithmetic(T);
46
+ };
47
+
48
+ template <typename T, int N>
49
+ using HLSL_FIXED_VECTOR =
50
+ vector<__detail::enable_if_t<(N > 1 && N <= 4), T>, N>;
51
+
52
+ } // namespace __detail
53
+ } // namespace hlsl
54
+ #endif //_HLSL_HLSL_DETAILS_H_
@@ -0,0 +1,144 @@
1
+ //===----- hlsl_intrinsic_helpers.h - HLSL helpers 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 _HLSL_HLSL_INTRINSIC_HELPERS_H_
10
+ #define _HLSL_HLSL_INTRINSIC_HELPERS_H_
11
+
12
+ namespace hlsl {
13
+ namespace __detail {
14
+
15
+ constexpr vector<uint, 4> d3d_color_to_ubyte4_impl(vector<float, 4> V) {
16
+ // Use the same scaling factor used by FXC, and DXC for DXIL
17
+ // (i.e., 255.001953)
18
+ // https://github.com/microsoft/DirectXShaderCompiler/blob/070d0d5a2beacef9eeb51037a9b04665716fd6f3/lib/HLSL/HLOperationLower.cpp#L666C1-L697C2
19
+ // The DXC implementation refers to a comment on the following stackoverflow
20
+ // discussion to justify the scaling factor: "Built-in rounding, necessary
21
+ // because of truncation. 0.001953 * 256 = 0.5"
22
+ // https://stackoverflow.com/questions/52103720/why-does-d3dcolortoubyte4-multiplies-components-by-255-001953f
23
+ return V.zyxw * 255.001953f;
24
+ }
25
+
26
+ template <typename T> constexpr T length_impl(T X) { return abs(X); }
27
+
28
+ template <typename T, int N>
29
+ constexpr enable_if_t<is_same<float, T>::value || is_same<half, T>::value, T>
30
+ length_vec_impl(vector<T, N> X) {
31
+ #if (__has_builtin(__builtin_spirv_length))
32
+ return __builtin_spirv_length(X);
33
+ #else
34
+ return sqrt(dot(X, X));
35
+ #endif
36
+ }
37
+
38
+ template <typename T>
39
+ constexpr vector<T, 4> dst_impl(vector<T, 4> Src0, vector<T, 4> Src1) {
40
+ return {1, Src0[1] * Src1[1], Src0[2], Src1[3]};
41
+ }
42
+
43
+ template <typename T> constexpr T distance_impl(T X, T Y) {
44
+ return length_impl(X - Y);
45
+ }
46
+
47
+ template <typename T, int N>
48
+ constexpr enable_if_t<is_same<float, T>::value || is_same<half, T>::value, T>
49
+ distance_vec_impl(vector<T, N> X, vector<T, N> Y) {
50
+ return length_vec_impl(X - Y);
51
+ }
52
+
53
+ constexpr float dot2add_impl(half2 a, half2 b, float c) {
54
+ #if (__has_builtin(__builtin_dx_dot2add))
55
+ return __builtin_dx_dot2add(a, b, c);
56
+ #else
57
+ return dot(a, b) + c;
58
+ #endif
59
+ }
60
+
61
+ template <typename T> constexpr T reflect_impl(T I, T N) {
62
+ return I - 2 * N * I * N;
63
+ }
64
+
65
+ template <typename T, int L>
66
+ constexpr vector<T, L> reflect_vec_impl(vector<T, L> I, vector<T, L> N) {
67
+ #if (__has_builtin(__builtin_spirv_reflect))
68
+ return __builtin_spirv_reflect(I, N);
69
+ #else
70
+ return I - 2 * N * dot(I, N);
71
+ #endif
72
+ }
73
+
74
+ template <typename T> constexpr T fmod_impl(T X, T Y) {
75
+ #if !defined(__DIRECTX__)
76
+ return __builtin_elementwise_fmod(X, Y);
77
+ #else
78
+ T div = X / Y;
79
+ bool ge = div >= 0;
80
+ T frc = frac(abs(div));
81
+ return select<T>(ge, frc, -frc) * Y;
82
+ #endif
83
+ }
84
+
85
+ template <typename T, int N>
86
+ constexpr vector<T, N> fmod_vec_impl(vector<T, N> X, vector<T, N> Y) {
87
+ #if !defined(__DIRECTX__)
88
+ return __builtin_elementwise_fmod(X, Y);
89
+ #else
90
+ vector<T, N> div = X / Y;
91
+ vector<bool, N> ge = div >= 0;
92
+ vector<T, N> frc = frac(abs(div));
93
+ return select<T>(ge, frc, -frc) * Y;
94
+ #endif
95
+ }
96
+
97
+ template <typename T> constexpr T smoothstep_impl(T Min, T Max, T X) {
98
+ #if (__has_builtin(__builtin_spirv_smoothstep))
99
+ return __builtin_spirv_smoothstep(Min, Max, X);
100
+ #else
101
+ T S = saturate((X - Min) / (Max - Min));
102
+ return (3 - 2 * S) * S * S;
103
+ #endif
104
+ }
105
+
106
+ template <typename T, int N>
107
+ constexpr vector<T, N> smoothstep_vec_impl(vector<T, N> Min, vector<T, N> Max,
108
+ vector<T, N> X) {
109
+ #if (__has_builtin(__builtin_spirv_smoothstep))
110
+ return __builtin_spirv_smoothstep(Min, Max, X);
111
+ #else
112
+ vector<T, N> S = saturate((X - Min) / (Max - Min));
113
+ return (3 - 2 * S) * S * S;
114
+ #endif
115
+ }
116
+
117
+ template <typename T> constexpr vector<T, 4> lit_impl(T NDotL, T NDotH, T M) {
118
+ bool DiffuseCond = NDotL < 0;
119
+ T Diffuse = select<T>(DiffuseCond, 0, NDotL);
120
+ vector<T, 4> Result = {1, Diffuse, 0, 1};
121
+ // clang-format off
122
+ bool SpecularCond = or(DiffuseCond, (NDotH < 0));
123
+ // clang-format on
124
+ T SpecularExp = exp(log(NDotH) * M);
125
+ Result[2] = select<T>(SpecularCond, 0, SpecularExp);
126
+ return Result;
127
+ }
128
+
129
+ template <typename T> constexpr T faceforward_impl(T N, T I, T Ng) {
130
+ #if (__has_builtin(__builtin_spirv_faceforward))
131
+ return __builtin_spirv_faceforward(N, I, Ng);
132
+ #else
133
+ return select(dot(I, Ng) < 0, N, -N);
134
+ #endif
135
+ }
136
+
137
+ template <typename T> constexpr T ldexp_impl(T X, T Exp) {
138
+ return exp2(Exp) * X;
139
+ }
140
+
141
+ } // namespace __detail
142
+ } // namespace hlsl
143
+
144
+ #endif // _HLSL_HLSL_INTRINSIC_HELPERS_H_