@cpp-linter/clang-tidy-linux-arm64 17.0.6 → 19.1.0

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 (252) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy +2 -2
  3. package/lib/clang/{17 → 19}/include/__clang_cuda_device_functions.h +2 -2
  4. package/lib/clang/{17 → 19}/include/__clang_cuda_intrinsics.h +1 -3
  5. package/lib/clang/{17 → 19}/include/__clang_cuda_libdevice_declares.h +2 -2
  6. package/lib/clang/{17 → 19}/include/__clang_cuda_math.h +2 -2
  7. package/lib/clang/{17 → 19}/include/__clang_cuda_runtime_wrapper.h +2 -2
  8. package/lib/clang/{17 → 19}/include/__clang_hip_math.h +192 -171
  9. package/lib/clang/{17 → 19}/include/__clang_hip_runtime_wrapper.h +34 -26
  10. package/lib/clang/19/include/__stdarg___gnuc_va_list.h +13 -0
  11. package/lib/clang/19/include/__stdarg___va_copy.h +12 -0
  12. package/lib/clang/19/include/__stdarg_header_macro.h +12 -0
  13. package/lib/clang/19/include/__stdarg_va_arg.h +22 -0
  14. package/lib/clang/19/include/__stdarg_va_copy.h +12 -0
  15. package/lib/clang/19/include/__stdarg_va_list.h +13 -0
  16. package/lib/clang/19/include/__stddef_header_macro.h +12 -0
  17. package/lib/clang/{17 → 19}/include/__stddef_max_align_t.h +1 -1
  18. package/lib/clang/19/include/__stddef_null.h +29 -0
  19. package/lib/clang/19/include/__stddef_nullptr_t.h +29 -0
  20. package/lib/clang/19/include/__stddef_offsetof.h +17 -0
  21. package/lib/clang/19/include/__stddef_ptrdiff_t.h +20 -0
  22. package/lib/clang/19/include/__stddef_rsize_t.h +20 -0
  23. package/lib/clang/19/include/__stddef_size_t.h +20 -0
  24. package/lib/clang/19/include/__stddef_unreachable.h +21 -0
  25. package/lib/clang/19/include/__stddef_wchar_t.h +28 -0
  26. package/lib/clang/19/include/__stddef_wint_t.h +15 -0
  27. package/lib/clang/{17/include/adxintrin.h → 19/include/adcintrin.h} +27 -94
  28. package/lib/clang/19/include/adxintrin.h +102 -0
  29. package/lib/clang/{17 → 19}/include/altivec.h +31 -12
  30. package/lib/clang/{17 → 19}/include/ammintrin.h +4 -4
  31. package/lib/clang/{17 → 19}/include/arm_acle.h +138 -32
  32. package/lib/clang/{17 → 19}/include/arm_fp16.h +1 -1
  33. package/lib/clang/{17 → 19}/include/arm_neon.h +43361 -43608
  34. package/lib/clang/19/include/arm_sme.h +2819 -0
  35. package/lib/clang/{17 → 19}/include/arm_sve.h +30202 -23615
  36. package/lib/clang/19/include/arm_vector_types.h +345 -0
  37. package/lib/clang/{17 → 19}/include/avx2intrin.h +24 -3
  38. package/lib/clang/{17 → 19}/include/avx512bf16intrin.h +3 -2
  39. package/lib/clang/{17 → 19}/include/avx512bitalgintrin.h +4 -1
  40. package/lib/clang/{17 → 19}/include/avx512bwintrin.h +28 -38
  41. package/lib/clang/{17 → 19}/include/avx512cdintrin.h +3 -1
  42. package/lib/clang/{17 → 19}/include/avx512dqintrin.h +4 -2
  43. package/lib/clang/{17 → 19}/include/avx512fintrin.h +7 -3
  44. package/lib/clang/{17 → 19}/include/avx512fp16intrin.h +44 -42
  45. package/lib/clang/{17 → 19}/include/avx512ifmaintrin.h +3 -1
  46. package/lib/clang/{17 → 19}/include/avx512ifmavlintrin.h +8 -2
  47. package/lib/clang/{17 → 19}/include/avx512vbmi2intrin.h +1 -1
  48. package/lib/clang/{17 → 19}/include/avx512vbmiintrin.h +3 -2
  49. package/lib/clang/{17 → 19}/include/avx512vbmivlintrin.h +8 -3
  50. package/lib/clang/{17 → 19}/include/avx512vlbf16intrin.h +8 -6
  51. package/lib/clang/{17 → 19}/include/avx512vlbitalgintrin.h +8 -2
  52. package/lib/clang/{17 → 19}/include/avx512vlbwintrin.h +8 -2
  53. package/lib/clang/{17 → 19}/include/avx512vlcdintrin.h +8 -3
  54. package/lib/clang/{17 → 19}/include/avx512vldqintrin.h +8 -2
  55. package/lib/clang/{17 → 19}/include/avx512vlfp16intrin.h +2 -2
  56. package/lib/clang/{17 → 19}/include/avx512vlintrin.h +8 -2
  57. package/lib/clang/{17 → 19}/include/avx512vlvbmi2intrin.h +8 -2
  58. package/lib/clang/{17 → 19}/include/avx512vlvnniintrin.h +8 -2
  59. package/lib/clang/{17 → 19}/include/avx512vlvp2intersectintrin.h +6 -4
  60. package/lib/clang/{17 → 19}/include/avx512vnniintrin.h +3 -2
  61. package/lib/clang/{17 → 19}/include/avx512vp2intersectintrin.h +3 -2
  62. package/lib/clang/{17 → 19}/include/avx512vpopcntdqintrin.h +3 -1
  63. package/lib/clang/{17 → 19}/include/avx512vpopcntdqvlintrin.h +6 -2
  64. package/lib/clang/{17 → 19}/include/avxintrin.h +67 -49
  65. package/lib/clang/{17 → 19}/include/bmiintrin.h +233 -50
  66. package/lib/clang/{17 → 19}/include/builtins.h +3 -0
  67. package/lib/clang/{17 → 19}/include/cpuid.h +23 -3
  68. package/lib/clang/{17 → 19}/include/cuda_wrappers/algorithm +1 -1
  69. package/lib/clang/{17 → 19}/include/emmintrin.h +311 -180
  70. package/lib/clang/{17 → 19}/include/float.h +28 -0
  71. package/lib/clang/{17 → 19}/include/fmaintrin.h +32 -16
  72. package/lib/clang/{17 → 19}/include/gfniintrin.h +23 -6
  73. package/lib/clang/{17 → 19}/include/hlsl/hlsl_basic_types.h +10 -3
  74. package/lib/clang/19/include/hlsl/hlsl_intrinsics.h +1697 -0
  75. package/lib/clang/19/include/ia32intrin.h +863 -0
  76. package/lib/clang/{17 → 19}/include/immintrin.h +149 -160
  77. package/lib/clang/{17 → 19}/include/intrin.h +61 -221
  78. package/lib/clang/19/include/intrin0.h +247 -0
  79. package/lib/clang/{17 → 19}/include/inttypes.h +4 -0
  80. package/lib/clang/{17 → 19}/include/iso646.h +4 -0
  81. package/lib/clang/{17 → 19}/include/keylockerintrin.h +5 -8
  82. package/lib/clang/{17 → 19}/include/larchintrin.h +13 -1
  83. package/lib/clang/19/include/lasxintrin.h +3884 -0
  84. package/lib/clang/{17 → 19}/include/limits.h +7 -4
  85. package/lib/clang/{17/include/llvm_libc_wrappers/stdio.h → 19/include/llvm_libc_wrappers/assert.h} +7 -7
  86. package/lib/clang/{17 → 19}/include/llvm_libc_wrappers/ctype.h +17 -0
  87. package/lib/clang/19/include/llvm_libc_wrappers/stdio.h +80 -0
  88. package/lib/clang/{17 → 19}/include/llvm_libc_wrappers/stdlib.h +4 -1
  89. package/lib/clang/19/include/llvm_libc_wrappers/string.h +96 -0
  90. package/lib/clang/{17/include/llvm_libc_wrappers/string.h → 19/include/llvm_libc_wrappers/time.h} +9 -12
  91. package/lib/clang/19/include/lsxintrin.h +3750 -0
  92. package/lib/clang/19/include/mm3dnow.h +22 -0
  93. package/lib/clang/{17 → 19}/include/mmintrin.h +83 -89
  94. package/lib/clang/19/include/module.modulemap +330 -0
  95. package/lib/clang/{17 → 19}/include/opencl-c-base.h +9 -0
  96. package/lib/clang/{17 → 19}/include/opencl-c.h +15 -0
  97. package/lib/clang/{17 → 19}/include/openmp_wrappers/cmath +1 -1
  98. package/lib/clang/{17 → 19}/include/pmmintrin.h +3 -2
  99. package/lib/clang/19/include/ppc_wrappers/nmmintrin.h +26 -0
  100. package/lib/clang/{17 → 19}/include/ppc_wrappers/smmintrin.h +35 -15
  101. package/lib/clang/{17 → 19}/include/prfchwintrin.h +10 -8
  102. package/lib/clang/19/include/ptrauth.h +330 -0
  103. package/lib/clang/19/include/riscv_bitmanip.h +195 -0
  104. package/lib/clang/19/include/riscv_crypto.h +170 -0
  105. package/lib/clang/{17 → 19}/include/riscv_ntlh.h +3 -5
  106. package/lib/clang/{17 → 19}/include/riscv_vector.h +31 -4
  107. package/lib/clang/19/include/sifive_vector.h +118 -0
  108. package/lib/clang/{17 → 19}/include/smmintrin.h +15 -15
  109. package/lib/clang/{17 → 19}/include/stdalign.h +6 -3
  110. package/lib/clang/19/include/stdarg.h +75 -0
  111. package/lib/clang/{17 → 19}/include/stdatomic.h +14 -6
  112. package/lib/clang/{17 → 19}/include/stdbool.h +5 -0
  113. package/lib/clang/19/include/stdckdint.h +42 -0
  114. package/lib/clang/19/include/stddef.h +139 -0
  115. package/lib/clang/{17 → 19}/include/stdint.h +24 -48
  116. package/lib/clang/{17 → 19}/include/stdnoreturn.h +8 -2
  117. package/lib/clang/{17 → 19}/include/tmmintrin.h +27 -18
  118. package/lib/clang/19/include/usermsrintrin.h +51 -0
  119. package/lib/clang/{17 → 19}/include/vaesintrin.h +4 -2
  120. package/lib/clang/{17 → 19}/include/varargs.h +5 -1
  121. package/lib/clang/{17 → 19}/include/vecintrin.h +217 -199
  122. package/lib/clang/{17 → 19}/include/x86gprintrin.h +10 -12
  123. package/lib/clang/19/include/x86intrin.h +53 -0
  124. package/lib/clang/{17 → 19}/include/xmmintrin.h +294 -104
  125. package/lib/clang/19/include/yvals_core.h +25 -0
  126. package/lib/clang/19/include/zos_wrappers/builtins.h +18 -0
  127. package/package.json +6 -6
  128. package/lib/clang/17/include/arm_sme_draft_spec_subject_to_change.h +0 -642
  129. package/lib/clang/17/include/avx512erintrin.h +0 -271
  130. package/lib/clang/17/include/avx512pfintrin.h +0 -97
  131. package/lib/clang/17/include/hlsl/hlsl_intrinsics.h +0 -480
  132. package/lib/clang/17/include/ia32intrin.h +0 -441
  133. package/lib/clang/17/include/mm3dnow.h +0 -157
  134. package/lib/clang/17/include/module.modulemap +0 -164
  135. package/lib/clang/17/include/sifive_vector.h +0 -16
  136. package/lib/clang/17/include/stdarg.h +0 -51
  137. package/lib/clang/17/include/stddef.h +0 -133
  138. package/lib/clang/17/include/x86intrin.h +0 -67
  139. /package/lib/clang/{17 → 19}/include/__clang_cuda_builtin_vars.h +0 -0
  140. /package/lib/clang/{17 → 19}/include/__clang_cuda_cmath.h +0 -0
  141. /package/lib/clang/{17 → 19}/include/__clang_cuda_complex_builtins.h +0 -0
  142. /package/lib/clang/{17 → 19}/include/__clang_cuda_math_forward_declares.h +0 -0
  143. /package/lib/clang/{17 → 19}/include/__clang_cuda_texture_intrinsics.h +0 -0
  144. /package/lib/clang/{17 → 19}/include/__clang_hip_cmath.h +0 -0
  145. /package/lib/clang/{17 → 19}/include/__clang_hip_libdevice_declares.h +0 -0
  146. /package/lib/clang/{17 → 19}/include/__clang_hip_stdlib.h +0 -0
  147. /package/lib/clang/{17 → 19}/include/__wmmintrin_aes.h +0 -0
  148. /package/lib/clang/{17 → 19}/include/__wmmintrin_pclmul.h +0 -0
  149. /package/lib/clang/{17 → 19}/include/amxcomplexintrin.h +0 -0
  150. /package/lib/clang/{17 → 19}/include/amxfp16intrin.h +0 -0
  151. /package/lib/clang/{17 → 19}/include/amxintrin.h +0 -0
  152. /package/lib/clang/{17 → 19}/include/arm64intr.h +0 -0
  153. /package/lib/clang/{17 → 19}/include/arm_bf16.h +0 -0
  154. /package/lib/clang/{17 → 19}/include/arm_cde.h +0 -0
  155. /package/lib/clang/{17 → 19}/include/arm_cmse.h +0 -0
  156. /package/lib/clang/{17 → 19}/include/arm_mve.h +0 -0
  157. /package/lib/clang/{17 → 19}/include/arm_neon_sve_bridge.h +0 -0
  158. /package/lib/clang/{17 → 19}/include/armintr.h +0 -0
  159. /package/lib/clang/{17 → 19}/include/avxifmaintrin.h +0 -0
  160. /package/lib/clang/{17 → 19}/include/avxneconvertintrin.h +0 -0
  161. /package/lib/clang/{17 → 19}/include/avxvnniint16intrin.h +0 -0
  162. /package/lib/clang/{17 → 19}/include/avxvnniint8intrin.h +0 -0
  163. /package/lib/clang/{17 → 19}/include/avxvnniintrin.h +0 -0
  164. /package/lib/clang/{17 → 19}/include/bmi2intrin.h +0 -0
  165. /package/lib/clang/{17 → 19}/include/cet.h +0 -0
  166. /package/lib/clang/{17 → 19}/include/cetintrin.h +0 -0
  167. /package/lib/clang/{17 → 19}/include/cldemoteintrin.h +0 -0
  168. /package/lib/clang/{17 → 19}/include/clflushoptintrin.h +0 -0
  169. /package/lib/clang/{17 → 19}/include/clwbintrin.h +0 -0
  170. /package/lib/clang/{17 → 19}/include/clzerointrin.h +0 -0
  171. /package/lib/clang/{17 → 19}/include/cmpccxaddintrin.h +0 -0
  172. /package/lib/clang/{17 → 19}/include/crc32intrin.h +0 -0
  173. /package/lib/clang/{17 → 19}/include/cuda_wrappers/bits/basic_string.h +0 -0
  174. /package/lib/clang/{17 → 19}/include/cuda_wrappers/bits/basic_string.tcc +0 -0
  175. /package/lib/clang/{17 → 19}/include/cuda_wrappers/bits/shared_ptr_base.h +0 -0
  176. /package/lib/clang/{17 → 19}/include/cuda_wrappers/cmath +0 -0
  177. /package/lib/clang/{17 → 19}/include/cuda_wrappers/complex +0 -0
  178. /package/lib/clang/{17 → 19}/include/cuda_wrappers/new +0 -0
  179. /package/lib/clang/{17 → 19}/include/enqcmdintrin.h +0 -0
  180. /package/lib/clang/{17 → 19}/include/f16cintrin.h +0 -0
  181. /package/lib/clang/{17 → 19}/include/fma4intrin.h +0 -0
  182. /package/lib/clang/{17 → 19}/include/fxsrintrin.h +0 -0
  183. /package/lib/clang/{17 → 19}/include/hexagon_circ_brev_intrinsics.h +0 -0
  184. /package/lib/clang/{17 → 19}/include/hexagon_protos.h +0 -0
  185. /package/lib/clang/{17 → 19}/include/hexagon_types.h +0 -0
  186. /package/lib/clang/{17 → 19}/include/hlsl.h +0 -0
  187. /package/lib/clang/{17 → 19}/include/hresetintrin.h +0 -0
  188. /package/lib/clang/{17 → 19}/include/htmintrin.h +0 -0
  189. /package/lib/clang/{17 → 19}/include/htmxlintrin.h +0 -0
  190. /package/lib/clang/{17 → 19}/include/hvx_hexagon_protos.h +0 -0
  191. /package/lib/clang/{17 → 19}/include/invpcidintrin.h +0 -0
  192. /package/lib/clang/{17 → 19}/include/llvm_libc_wrappers/inttypes.h +0 -0
  193. /package/lib/clang/{17 → 19}/include/lwpintrin.h +0 -0
  194. /package/lib/clang/{17 → 19}/include/lzcntintrin.h +0 -0
  195. /package/lib/clang/{17 → 19}/include/mm_malloc.h +0 -0
  196. /package/lib/clang/{17 → 19}/include/movdirintrin.h +0 -0
  197. /package/lib/clang/{17 → 19}/include/msa.h +0 -0
  198. /package/lib/clang/{17 → 19}/include/mwaitxintrin.h +0 -0
  199. /package/lib/clang/{17 → 19}/include/nmmintrin.h +0 -0
  200. /package/lib/clang/{17 → 19}/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -0
  201. /package/lib/clang/{17 → 19}/include/openmp_wrappers/complex +0 -0
  202. /package/lib/clang/{17 → 19}/include/openmp_wrappers/complex.h +0 -0
  203. /package/lib/clang/{17 → 19}/include/openmp_wrappers/complex_cmath.h +0 -0
  204. /package/lib/clang/{17 → 19}/include/openmp_wrappers/math.h +0 -0
  205. /package/lib/clang/{17 → 19}/include/openmp_wrappers/new +0 -0
  206. /package/lib/clang/{17 → 19}/include/pconfigintrin.h +0 -0
  207. /package/lib/clang/{17 → 19}/include/pkuintrin.h +0 -0
  208. /package/lib/clang/{17 → 19}/include/popcntintrin.h +0 -0
  209. /package/lib/clang/{17 → 19}/include/ppc_wrappers/bmi2intrin.h +0 -0
  210. /package/lib/clang/{17 → 19}/include/ppc_wrappers/bmiintrin.h +0 -0
  211. /package/lib/clang/{17 → 19}/include/ppc_wrappers/emmintrin.h +0 -0
  212. /package/lib/clang/{17 → 19}/include/ppc_wrappers/immintrin.h +0 -0
  213. /package/lib/clang/{17 → 19}/include/ppc_wrappers/mm_malloc.h +0 -0
  214. /package/lib/clang/{17 → 19}/include/ppc_wrappers/mmintrin.h +0 -0
  215. /package/lib/clang/{17 → 19}/include/ppc_wrappers/pmmintrin.h +0 -0
  216. /package/lib/clang/{17 → 19}/include/ppc_wrappers/tmmintrin.h +0 -0
  217. /package/lib/clang/{17 → 19}/include/ppc_wrappers/x86gprintrin.h +0 -0
  218. /package/lib/clang/{17 → 19}/include/ppc_wrappers/x86intrin.h +0 -0
  219. /package/lib/clang/{17 → 19}/include/ppc_wrappers/xmmintrin.h +0 -0
  220. /package/lib/clang/{17 → 19}/include/prfchiintrin.h +0 -0
  221. /package/lib/clang/{17 → 19}/include/ptwriteintrin.h +0 -0
  222. /package/lib/clang/{17 → 19}/include/raointintrin.h +0 -0
  223. /package/lib/clang/{17 → 19}/include/rdpruintrin.h +0 -0
  224. /package/lib/clang/{17 → 19}/include/rdseedintrin.h +0 -0
  225. /package/lib/clang/{17 → 19}/include/rtmintrin.h +0 -0
  226. /package/lib/clang/{17 → 19}/include/s390intrin.h +0 -0
  227. /package/lib/clang/{17 → 19}/include/serializeintrin.h +0 -0
  228. /package/lib/clang/{17 → 19}/include/sgxintrin.h +0 -0
  229. /package/lib/clang/{17 → 19}/include/sha512intrin.h +0 -0
  230. /package/lib/clang/{17 → 19}/include/shaintrin.h +0 -0
  231. /package/lib/clang/{17 → 19}/include/sm3intrin.h +0 -0
  232. /package/lib/clang/{17 → 19}/include/sm4intrin.h +0 -0
  233. /package/lib/clang/{17 → 19}/include/tbmintrin.h +0 -0
  234. /package/lib/clang/{17 → 19}/include/tgmath.h +0 -0
  235. /package/lib/clang/{17 → 19}/include/tsxldtrkintrin.h +0 -0
  236. /package/lib/clang/{17 → 19}/include/uintrintrin.h +0 -0
  237. /package/lib/clang/{17 → 19}/include/unwind.h +0 -0
  238. /package/lib/clang/{17 → 19}/include/vadefs.h +0 -0
  239. /package/lib/clang/{17 → 19}/include/velintrin.h +0 -0
  240. /package/lib/clang/{17 → 19}/include/velintrin_approx.h +0 -0
  241. /package/lib/clang/{17 → 19}/include/velintrin_gen.h +0 -0
  242. /package/lib/clang/{17 → 19}/include/vpclmulqdqintrin.h +0 -0
  243. /package/lib/clang/{17 → 19}/include/waitpkgintrin.h +0 -0
  244. /package/lib/clang/{17 → 19}/include/wasm_simd128.h +0 -0
  245. /package/lib/clang/{17 → 19}/include/wbnoinvdintrin.h +0 -0
  246. /package/lib/clang/{17 → 19}/include/wmmintrin.h +0 -0
  247. /package/lib/clang/{17 → 19}/include/xopintrin.h +0 -0
  248. /package/lib/clang/{17 → 19}/include/xsavecintrin.h +0 -0
  249. /package/lib/clang/{17 → 19}/include/xsaveintrin.h +0 -0
  250. /package/lib/clang/{17 → 19}/include/xsaveoptintrin.h +0 -0
  251. /package/lib/clang/{17 → 19}/include/xsavesintrin.h +0 -0
  252. /package/lib/clang/{17 → 19}/include/xtestintrin.h +0 -0
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @cpp-linter/clang-tidy-linux-arm64
2
2
 
3
- The Linux arm64 binary of clang-tidy from LLVM 17.0.6, for [`@cpp-linter/clang-tidy`](https://www.npmjs.com/package/@cpp-linter/clang-tidy).
3
+ The Linux arm64 binary of clang-tidy from LLVM 19.1.0, for [`@cpp-linter/clang-tidy`](https://www.npmjs.com/package/@cpp-linter/clang-tidy).
4
4
 
5
5
  Install `@cpp-linter/clang-tidy` instead of this package: npm picks the binary for your platform.
6
6
 
7
- The binary is a static build from the release [`llvm-17.0.6-2`](https://github.com/cpp-linter/clang-tools-static-binaries/releases/tag/llvm-17.0.6-2) of [cpp-linter/clang-tools-static-binaries](https://github.com/cpp-linter/clang-tools-static-binaries). LLVM is licensed under the Apache License v2.0 with LLVM Exceptions (see `LICENSE.TXT`).
7
+ The binary is a static build from the release [`llvm-19.1.0-3`](https://github.com/cpp-linter/clang-tools-static-binaries/releases/tag/llvm-19.1.0-3) of [cpp-linter/clang-tools-static-binaries](https://github.com/cpp-linter/clang-tools-static-binaries). LLVM is licensed under the Apache License v2.0 with LLVM Exceptions (see `LICENSE.TXT`).
package/bin/clang-tidy CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/bin/clang-tidy
3
- size: 62935440 bytes
4
- sha256: a86d9341c90f842eedb7c9391c3ce18d71d03ca998a51ce7325b69cde150dd42
3
+ size: 70637968 bytes
4
+ sha256: 8c67b549e3b97986100ec53df719c8a1f8dc8297227d981cc212f477bb756b7f
@@ -502,8 +502,8 @@ __DEVICE__ unsigned int __pm0(void) { return __nvvm_read_ptx_sreg_pm0(); }
502
502
  __DEVICE__ unsigned int __pm1(void) { return __nvvm_read_ptx_sreg_pm1(); }
503
503
  __DEVICE__ unsigned int __pm2(void) { return __nvvm_read_ptx_sreg_pm2(); }
504
504
  __DEVICE__ unsigned int __pm3(void) { return __nvvm_read_ptx_sreg_pm3(); }
505
- __DEVICE__ int __popc(int __a) { return __nv_popc(__a); }
506
- __DEVICE__ int __popcll(long long __a) { return __nv_popcll(__a); }
505
+ __DEVICE__ int __popc(unsigned int __a) { return __nv_popc(__a); }
506
+ __DEVICE__ int __popcll(unsigned long long __a) { return __nv_popcll(__a); }
507
507
  __DEVICE__ float __powf(float __a, float __b) {
508
508
  return __nv_fast_powf(__a, __b);
509
509
  }
@@ -215,9 +215,7 @@ inline __device__ unsigned int __activemask() {
215
215
  #if CUDA_VERSION < 9020
216
216
  return __nvvm_vote_ballot(1);
217
217
  #else
218
- unsigned int mask;
219
- asm volatile("activemask.b32 %0;" : "=r"(mask));
220
- return mask;
218
+ return __nvvm_activemask();
221
219
  #endif
222
220
  }
223
221
 
@@ -285,8 +285,8 @@ __DEVICE__ double __nv_normcdfinv(double __a);
285
285
  __DEVICE__ float __nv_normcdfinvf(float __a);
286
286
  __DEVICE__ float __nv_normf(int __a, const float *__b);
287
287
  __DEVICE__ double __nv_norm(int __a, const double *__b);
288
- __DEVICE__ int __nv_popc(int __a);
289
- __DEVICE__ int __nv_popcll(long long __a);
288
+ __DEVICE__ int __nv_popc(unsigned int __a);
289
+ __DEVICE__ int __nv_popcll(unsigned long long __a);
290
290
  __DEVICE__ double __nv_pow(double __a, double __b);
291
291
  __DEVICE__ float __nv_powf(float __a, float __b);
292
292
  __DEVICE__ double __nv_powi(double __a, int __b);
@@ -45,9 +45,9 @@
45
45
  // libdevice provides fast low precision and slow full-recision implementations
46
46
  // for some functions. Which one gets selected depends on
47
47
  // __CLANG_CUDA_APPROX_TRANSCENDENTALS__ which gets defined by clang if
48
- // -ffast-math or -fcuda-approx-transcendentals are in effect.
48
+ // -ffast-math or -fgpu-approx-transcendentals are in effect.
49
49
  #pragma push_macro("__FAST_OR_SLOW")
50
- #if defined(__CLANG_CUDA_APPROX_TRANSCENDENTALS__)
50
+ #if defined(__CLANG_GPU_APPROX_TRANSCENDENTALS__)
51
51
  #define __FAST_OR_SLOW(fast, slow) fast
52
52
  #else
53
53
  #define __FAST_OR_SLOW(fast, slow) slow
@@ -196,12 +196,12 @@ inline __host__ double __signbitd(double x) {
196
196
 
197
197
  // math_function.hpp uses the __USE_FAST_MATH__ macro to determine whether we
198
198
  // get the slow-but-accurate or fast-but-inaccurate versions of functions like
199
- // sin and exp. This is controlled in clang by -fcuda-approx-transcendentals.
199
+ // sin and exp. This is controlled in clang by -fgpu-approx-transcendentals.
200
200
  //
201
201
  // device_functions.hpp uses __USE_FAST_MATH__ for a different purpose (fast vs.
202
202
  // slow divides), so we need to scope our define carefully here.
203
203
  #pragma push_macro("__USE_FAST_MATH__")
204
- #if defined(__CLANG_CUDA_APPROX_TRANSCENDENTALS__)
204
+ #if defined(__CLANG_GPU_APPROX_TRANSCENDENTALS__)
205
205
  #define __USE_FAST_MATH__ 1
206
206
  #endif
207
207
 
@@ -14,9 +14,6 @@
14
14
  #endif
15
15
 
16
16
  #if !defined(__HIPCC_RTC__)
17
- #if defined(__cplusplus)
18
- #include <algorithm>
19
- #endif
20
17
  #include <limits.h>
21
18
  #include <stdint.h>
22
19
  #ifdef __OPENMP_AMDGCN__
@@ -32,6 +29,17 @@
32
29
  #define __DEVICE__ static __device__ inline __attribute__((always_inline))
33
30
  #endif
34
31
 
32
+ // Device library provides fast low precision and slow full-recision
33
+ // implementations for some functions. Which one gets selected depends on
34
+ // __CLANG_GPU_APPROX_TRANSCENDENTALS__ which gets defined by clang if
35
+ // -ffast-math or -fgpu-approx-transcendentals are in effect.
36
+ #pragma push_macro("__FAST_OR_SLOW")
37
+ #if defined(__CLANG_GPU_APPROX_TRANSCENDENTALS__)
38
+ #define __FAST_OR_SLOW(fast, slow) fast
39
+ #else
40
+ #define __FAST_OR_SLOW(fast, slow) slow
41
+ #endif
42
+
35
43
  // A few functions return bool type starting only in C++11.
36
44
  #pragma push_macro("__RETURN_TYPE")
37
45
  #ifdef __OPENMP_AMDGCN__
@@ -139,21 +147,180 @@ uint64_t __make_mantissa(const char *__tagp __attribute__((nonnull))) {
139
147
  }
140
148
 
141
149
  // BEGIN FLOAT
150
+
151
+ // BEGIN INTRINSICS
152
+
153
+ __DEVICE__
154
+ float __cosf(float __x) { return __ocml_native_cos_f32(__x); }
155
+
156
+ __DEVICE__
157
+ float __exp10f(float __x) {
158
+ const float __log2_10 = 0x1.a934f0p+1f;
159
+ return __builtin_amdgcn_exp2f(__log2_10 * __x);
160
+ }
161
+
162
+ __DEVICE__
163
+ float __expf(float __x) {
164
+ const float __log2_e = 0x1.715476p+0;
165
+ return __builtin_amdgcn_exp2f(__log2_e * __x);
166
+ }
167
+
168
+ #if defined OCML_BASIC_ROUNDED_OPERATIONS
169
+ __DEVICE__
170
+ float __fadd_rd(float __x, float __y) { return __ocml_add_rtn_f32(__x, __y); }
171
+ __DEVICE__
172
+ float __fadd_rn(float __x, float __y) { return __ocml_add_rte_f32(__x, __y); }
173
+ __DEVICE__
174
+ float __fadd_ru(float __x, float __y) { return __ocml_add_rtp_f32(__x, __y); }
175
+ __DEVICE__
176
+ float __fadd_rz(float __x, float __y) { return __ocml_add_rtz_f32(__x, __y); }
177
+ #else
178
+ __DEVICE__
179
+ float __fadd_rn(float __x, float __y) { return __x + __y; }
180
+ #endif
181
+
182
+ #if defined OCML_BASIC_ROUNDED_OPERATIONS
183
+ __DEVICE__
184
+ float __fdiv_rd(float __x, float __y) { return __ocml_div_rtn_f32(__x, __y); }
185
+ __DEVICE__
186
+ float __fdiv_rn(float __x, float __y) { return __ocml_div_rte_f32(__x, __y); }
187
+ __DEVICE__
188
+ float __fdiv_ru(float __x, float __y) { return __ocml_div_rtp_f32(__x, __y); }
189
+ __DEVICE__
190
+ float __fdiv_rz(float __x, float __y) { return __ocml_div_rtz_f32(__x, __y); }
191
+ #else
192
+ __DEVICE__
193
+ float __fdiv_rn(float __x, float __y) { return __x / __y; }
194
+ #endif
195
+
196
+ __DEVICE__
197
+ float __fdividef(float __x, float __y) { return __x / __y; }
198
+
199
+ #if defined OCML_BASIC_ROUNDED_OPERATIONS
200
+ __DEVICE__
201
+ float __fmaf_rd(float __x, float __y, float __z) {
202
+ return __ocml_fma_rtn_f32(__x, __y, __z);
203
+ }
204
+ __DEVICE__
205
+ float __fmaf_rn(float __x, float __y, float __z) {
206
+ return __ocml_fma_rte_f32(__x, __y, __z);
207
+ }
208
+ __DEVICE__
209
+ float __fmaf_ru(float __x, float __y, float __z) {
210
+ return __ocml_fma_rtp_f32(__x, __y, __z);
211
+ }
212
+ __DEVICE__
213
+ float __fmaf_rz(float __x, float __y, float __z) {
214
+ return __ocml_fma_rtz_f32(__x, __y, __z);
215
+ }
216
+ #else
217
+ __DEVICE__
218
+ float __fmaf_rn(float __x, float __y, float __z) {
219
+ return __builtin_fmaf(__x, __y, __z);
220
+ }
221
+ #endif
222
+
223
+ #if defined OCML_BASIC_ROUNDED_OPERATIONS
224
+ __DEVICE__
225
+ float __fmul_rd(float __x, float __y) { return __ocml_mul_rtn_f32(__x, __y); }
226
+ __DEVICE__
227
+ float __fmul_rn(float __x, float __y) { return __ocml_mul_rte_f32(__x, __y); }
228
+ __DEVICE__
229
+ float __fmul_ru(float __x, float __y) { return __ocml_mul_rtp_f32(__x, __y); }
230
+ __DEVICE__
231
+ float __fmul_rz(float __x, float __y) { return __ocml_mul_rtz_f32(__x, __y); }
232
+ #else
233
+ __DEVICE__
234
+ float __fmul_rn(float __x, float __y) { return __x * __y; }
235
+ #endif
236
+
237
+ #if defined OCML_BASIC_ROUNDED_OPERATIONS
238
+ __DEVICE__
239
+ float __frcp_rd(float __x) { return __ocml_div_rtn_f32(1.0f, __x); }
240
+ __DEVICE__
241
+ float __frcp_rn(float __x) { return __ocml_div_rte_f32(1.0f, __x); }
242
+ __DEVICE__
243
+ float __frcp_ru(float __x) { return __ocml_div_rtp_f32(1.0f, __x); }
244
+ __DEVICE__
245
+ float __frcp_rz(float __x) { return __ocml_div_rtz_f32(1.0f, __x); }
246
+ #else
247
+ __DEVICE__
248
+ float __frcp_rn(float __x) { return 1.0f / __x; }
249
+ #endif
250
+
251
+ __DEVICE__
252
+ float __frsqrt_rn(float __x) { return __builtin_amdgcn_rsqf(__x); }
253
+
254
+ #if defined OCML_BASIC_ROUNDED_OPERATIONS
255
+ __DEVICE__
256
+ float __fsqrt_rd(float __x) { return __ocml_sqrt_rtn_f32(__x); }
257
+ __DEVICE__
258
+ float __fsqrt_rn(float __x) { return __ocml_sqrt_rte_f32(__x); }
259
+ __DEVICE__
260
+ float __fsqrt_ru(float __x) { return __ocml_sqrt_rtp_f32(__x); }
261
+ __DEVICE__
262
+ float __fsqrt_rz(float __x) { return __ocml_sqrt_rtz_f32(__x); }
263
+ #else
264
+ __DEVICE__
265
+ float __fsqrt_rn(float __x) { return __ocml_native_sqrt_f32(__x); }
266
+ #endif
267
+
268
+ #if defined OCML_BASIC_ROUNDED_OPERATIONS
269
+ __DEVICE__
270
+ float __fsub_rd(float __x, float __y) { return __ocml_sub_rtn_f32(__x, __y); }
271
+ __DEVICE__
272
+ float __fsub_rn(float __x, float __y) { return __ocml_sub_rte_f32(__x, __y); }
273
+ __DEVICE__
274
+ float __fsub_ru(float __x, float __y) { return __ocml_sub_rtp_f32(__x, __y); }
275
+ __DEVICE__
276
+ float __fsub_rz(float __x, float __y) { return __ocml_sub_rtz_f32(__x, __y); }
277
+ #else
278
+ __DEVICE__
279
+ float __fsub_rn(float __x, float __y) { return __x - __y; }
280
+ #endif
281
+
282
+ __DEVICE__
283
+ float __log10f(float __x) { return __builtin_log10f(__x); }
284
+
285
+ __DEVICE__
286
+ float __log2f(float __x) { return __builtin_amdgcn_logf(__x); }
287
+
288
+ __DEVICE__
289
+ float __logf(float __x) { return __builtin_logf(__x); }
290
+
291
+ __DEVICE__
292
+ float __powf(float __x, float __y) { return __ocml_pow_f32(__x, __y); }
293
+
294
+ __DEVICE__
295
+ float __saturatef(float __x) { return (__x < 0) ? 0 : ((__x > 1) ? 1 : __x); }
296
+
297
+ __DEVICE__
298
+ void __sincosf(float __x, float *__sinptr, float *__cosptr) {
299
+ *__sinptr = __ocml_native_sin_f32(__x);
300
+ *__cosptr = __ocml_native_cos_f32(__x);
301
+ }
302
+
303
+ __DEVICE__
304
+ float __sinf(float __x) { return __ocml_native_sin_f32(__x); }
305
+
306
+ __DEVICE__
307
+ float __tanf(float __x) {
308
+ return __sinf(__x) * __builtin_amdgcn_rcpf(__cosf(__x));
309
+ }
310
+ // END INTRINSICS
311
+
142
312
  #if defined(__cplusplus)
143
313
  __DEVICE__
144
314
  int abs(int __x) {
145
- int __sgn = __x >> (sizeof(int) * CHAR_BIT - 1);
146
- return (__x ^ __sgn) - __sgn;
315
+ return __builtin_abs(__x);
147
316
  }
148
317
  __DEVICE__
149
318
  long labs(long __x) {
150
- long __sgn = __x >> (sizeof(long) * CHAR_BIT - 1);
151
- return (__x ^ __sgn) - __sgn;
319
+ return __builtin_labs(__x);
152
320
  }
153
321
  __DEVICE__
154
322
  long long llabs(long long __x) {
155
- long long __sgn = __x >> (sizeof(long long) * CHAR_BIT - 1);
156
- return (__x ^ __sgn) - __sgn;
323
+ return __builtin_llabs(__x);
157
324
  }
158
325
  #endif
159
326
 
@@ -188,7 +355,7 @@ __DEVICE__
188
355
  float copysignf(float __x, float __y) { return __builtin_copysignf(__x, __y); }
189
356
 
190
357
  __DEVICE__
191
- float cosf(float __x) { return __ocml_cos_f32(__x); }
358
+ float cosf(float __x) { return __FAST_OR_SLOW(__cosf, __ocml_cos_f32)(__x); }
192
359
 
193
360
  __DEVICE__
194
361
  float coshf(float __x) { return __ocml_cosh_f32(__x); }
@@ -321,13 +488,13 @@ __DEVICE__
321
488
  float log1pf(float __x) { return __ocml_log1p_f32(__x); }
322
489
 
323
490
  __DEVICE__
324
- float log2f(float __x) { return __builtin_log2f(__x); }
491
+ float log2f(float __x) { return __FAST_OR_SLOW(__log2f, __ocml_log2_f32)(__x); }
325
492
 
326
493
  __DEVICE__
327
494
  float logbf(float __x) { return __ocml_logb_f32(__x); }
328
495
 
329
496
  __DEVICE__
330
- float logf(float __x) { return __builtin_logf(__x); }
497
+ float logf(float __x) { return __FAST_OR_SLOW(__logf, __ocml_log_f32)(__x); }
331
498
 
332
499
  __DEVICE__
333
500
  long int lrintf(float __x) { return __builtin_rintf(__x); }
@@ -401,7 +568,7 @@ float normf(int __dim,
401
568
  ++__a;
402
569
  }
403
570
 
404
- return __ocml_sqrt_f32(__r);
571
+ return __builtin_sqrtf(__r);
405
572
  }
406
573
 
407
574
  __DEVICE__
@@ -483,9 +650,13 @@ void sincosf(float __x, float *__sinptr, float *__cosptr) {
483
650
  #ifdef __OPENMP_AMDGCN__
484
651
  #pragma omp allocate(__tmp) allocator(omp_thread_mem_alloc)
485
652
  #endif
653
+ #ifdef __CLANG_CUDA_APPROX_TRANSCENDENTALS__
654
+ __sincosf(__x, __sinptr, __cosptr);
655
+ #else
486
656
  *__sinptr =
487
657
  __ocml_sincos_f32(__x, (__attribute__((address_space(5))) float *)&__tmp);
488
658
  *__cosptr = __tmp;
659
+ #endif
489
660
  }
490
661
 
491
662
  __DEVICE__
@@ -500,7 +671,7 @@ void sincospif(float __x, float *__sinptr, float *__cosptr) {
500
671
  }
501
672
 
502
673
  __DEVICE__
503
- float sinf(float __x) { return __ocml_sin_f32(__x); }
674
+ float sinf(float __x) { return __FAST_OR_SLOW(__sinf, __ocml_sin_f32)(__x); }
504
675
 
505
676
  __DEVICE__
506
677
  float sinhf(float __x) { return __ocml_sinh_f32(__x); }
@@ -509,7 +680,7 @@ __DEVICE__
509
680
  float sinpif(float __x) { return __ocml_sinpi_f32(__x); }
510
681
 
511
682
  __DEVICE__
512
- float sqrtf(float __x) { return __ocml_sqrt_f32(__x); }
683
+ float sqrtf(float __x) { return __builtin_sqrtf(__x); }
513
684
 
514
685
  __DEVICE__
515
686
  float tanf(float __x) { return __ocml_tan_f32(__x); }
@@ -551,158 +722,7 @@ float ynf(int __n, float __x) { // TODO: we could use Ahmes multiplication
551
722
  return __x1;
552
723
  }
553
724
 
554
- // BEGIN INTRINSICS
555
-
556
- __DEVICE__
557
- float __cosf(float __x) { return __ocml_native_cos_f32(__x); }
558
-
559
- __DEVICE__
560
- float __exp10f(float __x) { return __ocml_native_exp10_f32(__x); }
561
-
562
- __DEVICE__
563
- float __expf(float __x) { return __ocml_native_exp_f32(__x); }
564
-
565
- #if defined OCML_BASIC_ROUNDED_OPERATIONS
566
- __DEVICE__
567
- float __fadd_rd(float __x, float __y) { return __ocml_add_rtn_f32(__x, __y); }
568
- __DEVICE__
569
- float __fadd_rn(float __x, float __y) { return __ocml_add_rte_f32(__x, __y); }
570
- __DEVICE__
571
- float __fadd_ru(float __x, float __y) { return __ocml_add_rtp_f32(__x, __y); }
572
- __DEVICE__
573
- float __fadd_rz(float __x, float __y) { return __ocml_add_rtz_f32(__x, __y); }
574
- #else
575
- __DEVICE__
576
- float __fadd_rn(float __x, float __y) { return __x + __y; }
577
- #endif
578
-
579
- #if defined OCML_BASIC_ROUNDED_OPERATIONS
580
- __DEVICE__
581
- float __fdiv_rd(float __x, float __y) { return __ocml_div_rtn_f32(__x, __y); }
582
- __DEVICE__
583
- float __fdiv_rn(float __x, float __y) { return __ocml_div_rte_f32(__x, __y); }
584
- __DEVICE__
585
- float __fdiv_ru(float __x, float __y) { return __ocml_div_rtp_f32(__x, __y); }
586
- __DEVICE__
587
- float __fdiv_rz(float __x, float __y) { return __ocml_div_rtz_f32(__x, __y); }
588
- #else
589
- __DEVICE__
590
- float __fdiv_rn(float __x, float __y) { return __x / __y; }
591
- #endif
592
-
593
- __DEVICE__
594
- float __fdividef(float __x, float __y) { return __x / __y; }
595
-
596
- #if defined OCML_BASIC_ROUNDED_OPERATIONS
597
- __DEVICE__
598
- float __fmaf_rd(float __x, float __y, float __z) {
599
- return __ocml_fma_rtn_f32(__x, __y, __z);
600
- }
601
- __DEVICE__
602
- float __fmaf_rn(float __x, float __y, float __z) {
603
- return __ocml_fma_rte_f32(__x, __y, __z);
604
- }
605
- __DEVICE__
606
- float __fmaf_ru(float __x, float __y, float __z) {
607
- return __ocml_fma_rtp_f32(__x, __y, __z);
608
- }
609
- __DEVICE__
610
- float __fmaf_rz(float __x, float __y, float __z) {
611
- return __ocml_fma_rtz_f32(__x, __y, __z);
612
- }
613
- #else
614
- __DEVICE__
615
- float __fmaf_rn(float __x, float __y, float __z) {
616
- return __builtin_fmaf(__x, __y, __z);
617
- }
618
- #endif
619
725
 
620
- #if defined OCML_BASIC_ROUNDED_OPERATIONS
621
- __DEVICE__
622
- float __fmul_rd(float __x, float __y) { return __ocml_mul_rtn_f32(__x, __y); }
623
- __DEVICE__
624
- float __fmul_rn(float __x, float __y) { return __ocml_mul_rte_f32(__x, __y); }
625
- __DEVICE__
626
- float __fmul_ru(float __x, float __y) { return __ocml_mul_rtp_f32(__x, __y); }
627
- __DEVICE__
628
- float __fmul_rz(float __x, float __y) { return __ocml_mul_rtz_f32(__x, __y); }
629
- #else
630
- __DEVICE__
631
- float __fmul_rn(float __x, float __y) { return __x * __y; }
632
- #endif
633
-
634
- #if defined OCML_BASIC_ROUNDED_OPERATIONS
635
- __DEVICE__
636
- float __frcp_rd(float __x) { return __ocml_div_rtn_f32(1.0f, __x); }
637
- __DEVICE__
638
- float __frcp_rn(float __x) { return __ocml_div_rte_f32(1.0f, __x); }
639
- __DEVICE__
640
- float __frcp_ru(float __x) { return __ocml_div_rtp_f32(1.0f, __x); }
641
- __DEVICE__
642
- float __frcp_rz(float __x) { return __ocml_div_rtz_f32(1.0f, __x); }
643
- #else
644
- __DEVICE__
645
- float __frcp_rn(float __x) { return 1.0f / __x; }
646
- #endif
647
-
648
- __DEVICE__
649
- float __frsqrt_rn(float __x) { return __builtin_amdgcn_rsqf(__x); }
650
-
651
- #if defined OCML_BASIC_ROUNDED_OPERATIONS
652
- __DEVICE__
653
- float __fsqrt_rd(float __x) { return __ocml_sqrt_rtn_f32(__x); }
654
- __DEVICE__
655
- float __fsqrt_rn(float __x) { return __ocml_sqrt_rte_f32(__x); }
656
- __DEVICE__
657
- float __fsqrt_ru(float __x) { return __ocml_sqrt_rtp_f32(__x); }
658
- __DEVICE__
659
- float __fsqrt_rz(float __x) { return __ocml_sqrt_rtz_f32(__x); }
660
- #else
661
- __DEVICE__
662
- float __fsqrt_rn(float __x) { return __ocml_native_sqrt_f32(__x); }
663
- #endif
664
-
665
- #if defined OCML_BASIC_ROUNDED_OPERATIONS
666
- __DEVICE__
667
- float __fsub_rd(float __x, float __y) { return __ocml_sub_rtn_f32(__x, __y); }
668
- __DEVICE__
669
- float __fsub_rn(float __x, float __y) { return __ocml_sub_rte_f32(__x, __y); }
670
- __DEVICE__
671
- float __fsub_ru(float __x, float __y) { return __ocml_sub_rtp_f32(__x, __y); }
672
- __DEVICE__
673
- float __fsub_rz(float __x, float __y) { return __ocml_sub_rtz_f32(__x, __y); }
674
- #else
675
- __DEVICE__
676
- float __fsub_rn(float __x, float __y) { return __x - __y; }
677
- #endif
678
-
679
- __DEVICE__
680
- float __log10f(float __x) { return __ocml_native_log10_f32(__x); }
681
-
682
- __DEVICE__
683
- float __log2f(float __x) { return __ocml_native_log2_f32(__x); }
684
-
685
- __DEVICE__
686
- float __logf(float __x) { return __ocml_native_log_f32(__x); }
687
-
688
- __DEVICE__
689
- float __powf(float __x, float __y) { return __ocml_pow_f32(__x, __y); }
690
-
691
- __DEVICE__
692
- float __saturatef(float __x) { return (__x < 0) ? 0 : ((__x > 1) ? 1 : __x); }
693
-
694
- __DEVICE__
695
- void __sincosf(float __x, float *__sinptr, float *__cosptr) {
696
- *__sinptr = __ocml_native_sin_f32(__x);
697
- *__cosptr = __ocml_native_cos_f32(__x);
698
- }
699
-
700
- __DEVICE__
701
- float __sinf(float __x) { return __ocml_native_sin_f32(__x); }
702
-
703
- __DEVICE__
704
- float __tanf(float __x) { return __ocml_tan_f32(__x); }
705
- // END INTRINSICS
706
726
  // END FLOAT
707
727
 
708
728
  // BEGIN DOUBLE
@@ -941,7 +961,7 @@ double norm(int __dim,
941
961
  ++__a;
942
962
  }
943
963
 
944
- return __ocml_sqrt_f64(__r);
964
+ return __builtin_sqrt(__r);
945
965
  }
946
966
 
947
967
  __DEVICE__
@@ -1064,7 +1084,7 @@ __DEVICE__
1064
1084
  double sinpi(double __x) { return __ocml_sinpi_f64(__x); }
1065
1085
 
1066
1086
  __DEVICE__
1067
- double sqrt(double __x) { return __ocml_sqrt_f64(__x); }
1087
+ double sqrt(double __x) { return __builtin_sqrt(__x); }
1068
1088
 
1069
1089
  __DEVICE__
1070
1090
  double tan(double __x) { return __ocml_tan_f64(__x); }
@@ -1198,7 +1218,7 @@ __DEVICE__
1198
1218
  double __dsqrt_rz(double __x) { return __ocml_sqrt_rtz_f64(__x); }
1199
1219
  #else
1200
1220
  __DEVICE__
1201
- double __dsqrt_rn(double __x) { return __ocml_sqrt_f64(__x); }
1221
+ double __dsqrt_rn(double __x) { return __builtin_sqrt(__x); }
1202
1222
  #endif
1203
1223
 
1204
1224
  #if defined OCML_BASIC_ROUNDED_OPERATIONS
@@ -1288,16 +1308,17 @@ double min(double __x, double __y) { return __builtin_fmin(__x, __y); }
1288
1308
 
1289
1309
  #if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__)
1290
1310
  __host__ inline static int min(int __arg1, int __arg2) {
1291
- return std::min(__arg1, __arg2);
1311
+ return __arg1 < __arg2 ? __arg1 : __arg2;
1292
1312
  }
1293
1313
 
1294
1314
  __host__ inline static int max(int __arg1, int __arg2) {
1295
- return std::max(__arg1, __arg2);
1315
+ return __arg1 > __arg2 ? __arg1 : __arg2;
1296
1316
  }
1297
1317
  #endif // !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__)
1298
1318
  #endif
1299
1319
 
1300
1320
  #pragma pop_macro("__DEVICE__")
1301
1321
  #pragma pop_macro("__RETURN_TYPE")
1322
+ #pragma pop_macro("__FAST_OR_SLOW")
1302
1323
 
1303
1324
  #endif // __CLANG_HIP_MATH_H__
@@ -47,28 +47,9 @@ extern "C" {
47
47
  #endif //__cplusplus
48
48
 
49
49
  #if !defined(__HIPCC_RTC__)
50
- #include <cmath>
51
- #include <cstdlib>
52
- #include <stdlib.h>
53
50
  #if __has_include("hip/hip_version.h")
54
51
  #include "hip/hip_version.h"
55
52
  #endif // __has_include("hip/hip_version.h")
56
- #else
57
- typedef __SIZE_TYPE__ size_t;
58
- // Define macros which are needed to declare HIP device API's without standard
59
- // C/C++ headers. This is for readability so that these API's can be written
60
- // the same way as non-hipRTC use case. These macros need to be popped so that
61
- // they do not pollute users' name space.
62
- #pragma push_macro("NULL")
63
- #pragma push_macro("uint32_t")
64
- #pragma push_macro("uint64_t")
65
- #pragma push_macro("CHAR_BIT")
66
- #pragma push_macro("INT_MAX")
67
- #define NULL (void *)0
68
- #define uint32_t __UINT32_TYPE__
69
- #define uint64_t __UINT64_TYPE__
70
- #define CHAR_BIT __CHAR_BIT__
71
- #define INT_MAX __INTMAX_MAX__
72
53
  #endif // __HIPCC_RTC__
73
54
 
74
55
  typedef __SIZE_TYPE__ __hip_size_t;
@@ -78,11 +59,13 @@ extern "C" {
78
59
  #endif //__cplusplus
79
60
 
80
61
  #if HIP_VERSION_MAJOR * 100 + HIP_VERSION_MINOR >= 405
81
- extern "C" __device__ unsigned long long __ockl_dm_alloc(unsigned long long __size);
82
- extern "C" __device__ void __ockl_dm_dealloc(unsigned long long __addr);
62
+ __device__ unsigned long long __ockl_dm_alloc(unsigned long long __size);
63
+ __device__ void __ockl_dm_dealloc(unsigned long long __addr);
83
64
  #if __has_feature(address_sanitizer)
84
- extern "C" __device__ unsigned long long __asan_malloc_impl(unsigned long long __size, unsigned long long __pc);
85
- extern "C" __device__ void __asan_free_impl(unsigned long long __addr, unsigned long long __pc);
65
+ __device__ unsigned long long __asan_malloc_impl(unsigned long long __size,
66
+ unsigned long long __pc);
67
+ __device__ void __asan_free_impl(unsigned long long __addr,
68
+ unsigned long long __pc);
86
69
  __attribute__((noinline, weak)) __device__ void *malloc(__hip_size_t __size) {
87
70
  unsigned long long __pc = (unsigned long long)__builtin_return_address(0);
88
71
  return (void *)__asan_malloc_impl(__size, __pc);
@@ -91,7 +74,7 @@ __attribute__((noinline, weak)) __device__ void free(void *__ptr) {
91
74
  unsigned long long __pc = (unsigned long long)__builtin_return_address(0);
92
75
  __asan_free_impl((unsigned long long)__ptr, __pc);
93
76
  }
94
- #else
77
+ #else // __has_feature(address_sanitizer)
95
78
  __attribute__((weak)) inline __device__ void *malloc(__hip_size_t __size) {
96
79
  return (void *) __ockl_dm_alloc(__size);
97
80
  }
@@ -109,7 +92,7 @@ __attribute__((weak)) inline __device__ void *malloc(__hip_size_t __size) {
109
92
  __attribute__((weak)) inline __device__ void free(void *__ptr) {
110
93
  __hip_free(__ptr);
111
94
  }
112
- #else
95
+ #else // __HIP_ENABLE_DEVICE_MALLOC__
113
96
  __attribute__((weak)) inline __device__ void *malloc(__hip_size_t __size) {
114
97
  __builtin_trap();
115
98
  return (void *)0;
@@ -117,13 +100,38 @@ __attribute__((weak)) inline __device__ void *malloc(__hip_size_t __size) {
117
100
  __attribute__((weak)) inline __device__ void free(void *__ptr) {
118
101
  __builtin_trap();
119
102
  }
120
- #endif
103
+ #endif // __HIP_ENABLE_DEVICE_MALLOC__
121
104
  #endif // HIP version check
122
105
 
123
106
  #ifdef __cplusplus
124
107
  } // extern "C"
125
108
  #endif //__cplusplus
126
109
 
110
+ #if !defined(__HIPCC_RTC__)
111
+ #include <cmath>
112
+ #include <cstdlib>
113
+ #include <stdlib.h>
114
+ #if __has_include("hip/hip_version.h")
115
+ #include "hip/hip_version.h"
116
+ #endif // __has_include("hip/hip_version.h")
117
+ #else
118
+ typedef __SIZE_TYPE__ size_t;
119
+ // Define macros which are needed to declare HIP device API's without standard
120
+ // C/C++ headers. This is for readability so that these API's can be written
121
+ // the same way as non-hipRTC use case. These macros need to be popped so that
122
+ // they do not pollute users' name space.
123
+ #pragma push_macro("NULL")
124
+ #pragma push_macro("uint32_t")
125
+ #pragma push_macro("uint64_t")
126
+ #pragma push_macro("CHAR_BIT")
127
+ #pragma push_macro("INT_MAX")
128
+ #define NULL (void *)0
129
+ #define uint32_t __UINT32_TYPE__
130
+ #define uint64_t __UINT64_TYPE__
131
+ #define CHAR_BIT __CHAR_BIT__
132
+ #define INT_MAX __INTMAX_MAX__
133
+ #endif // __HIPCC_RTC__
134
+
127
135
  #include <__clang_hip_libdevice_declares.h>
128
136
  #include <__clang_hip_math.h>
129
137
  #include <__clang_hip_stdlib.h>
@@ -0,0 +1,13 @@
1
+ /*===---- __stdarg___gnuc_va_list.h - Definition of __gnuc_va_list ---------===
2
+ *
3
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ * See https://llvm.org/LICENSE.txt for license information.
5
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ *
7
+ *===-----------------------------------------------------------------------===
8
+ */
9
+
10
+ #ifndef __GNUC_VA_LIST
11
+ #define __GNUC_VA_LIST
12
+ typedef __builtin_va_list __gnuc_va_list;
13
+ #endif