@cpp-linter/clang-tidy-linux-arm64 12.0.1 → 14.0.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 (178) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy +2 -2
  3. package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_complex_builtins.h +3 -3
  4. package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_device_functions.h +174 -102
  5. package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_intrinsics.h +32 -0
  6. package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_libdevice_declares.h +6 -0
  7. package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_math.h +3 -3
  8. package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_runtime_wrapper.h +68 -8
  9. package/lib/clang/14.0.0/include/__clang_cuda_texture_intrinsics.h +740 -0
  10. package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_hip_cmath.h +272 -94
  11. package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_hip_libdevice_declares.h +24 -12
  12. package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_hip_math.h +48 -2
  13. package/lib/clang/14.0.0/include/__clang_hip_runtime_wrapper.h +137 -0
  14. package/lib/clang/{12.0.1 → 14.0.0}/include/__wmmintrin_aes.h +1 -1
  15. package/lib/clang/{12.0.1 → 14.0.0}/include/altivec.h +1348 -496
  16. package/lib/clang/{12.0.1 → 14.0.0}/include/ammintrin.h +4 -0
  17. package/lib/clang/14.0.0/include/amxintrin.h +494 -0
  18. package/lib/clang/{12.0.1 → 14.0.0}/include/arm_acle.h +61 -0
  19. package/lib/clang/{12.0.1 → 14.0.0}/include/arm_neon.h +5544 -4634
  20. package/lib/clang/14.0.0/include/arm_neon_sve_bridge.h +184 -0
  21. package/lib/clang/{12.0.1 → 14.0.0}/include/arm_sve.h +11791 -5896
  22. package/lib/clang/{12.0.1 → 14.0.0}/include/avx2intrin.h +181 -181
  23. package/lib/clang/{12.0.1 → 14.0.0}/include/avx512bf16intrin.h +3 -3
  24. package/lib/clang/{12.0.1 → 14.0.0}/include/avx512bwintrin.h +71 -71
  25. package/lib/clang/{12.0.1 → 14.0.0}/include/avx512dqintrin.h +365 -365
  26. package/lib/clang/{12.0.1 → 14.0.0}/include/avx512erintrin.h +102 -102
  27. package/lib/clang/{12.0.1 → 14.0.0}/include/avx512fintrin.h +1750 -1606
  28. package/lib/clang/14.0.0/include/avx512fp16intrin.h +3349 -0
  29. package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vbmi2intrin.h +48 -48
  30. package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlbf16intrin.h +51 -3
  31. package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlbwintrin.h +94 -94
  32. package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vldqintrin.h +134 -134
  33. package/lib/clang/14.0.0/include/avx512vlfp16intrin.h +2068 -0
  34. package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlintrin.h +563 -563
  35. package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlvbmi2intrin.h +96 -96
  36. package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlvnniintrin.h +8 -8
  37. package/lib/clang/{12.0.1 → 14.0.0}/include/avxintrin.h +189 -192
  38. package/lib/clang/14.0.0/include/builtins.h +16 -0
  39. package/lib/clang/{12.0.1 → 14.0.0}/include/cetintrin.h +10 -0
  40. package/lib/clang/{12.0.1 → 14.0.0}/include/cpuid.h +2 -1
  41. package/lib/clang/14.0.0/include/crc32intrin.h +100 -0
  42. package/lib/clang/{12.0.1 → 14.0.0}/include/cuda_wrappers/complex +8 -0
  43. package/lib/clang/{12.0.1 → 14.0.0}/include/emmintrin.h +21 -17
  44. package/lib/clang/{12.0.1 → 14.0.0}/include/f16cintrin.h +4 -4
  45. package/lib/clang/{12.0.1 → 14.0.0}/include/float.h +15 -6
  46. package/lib/clang/{12.0.1 → 14.0.0}/include/gfniintrin.h +47 -48
  47. package/lib/clang/14.0.0/include/hexagon_circ_brev_intrinsics.h +298 -0
  48. package/lib/clang/14.0.0/include/hexagon_protos.h +8439 -0
  49. package/lib/clang/14.0.0/include/hexagon_types.h +2621 -0
  50. package/lib/clang/14.0.0/include/hvx_hexagon_protos.h +5183 -0
  51. package/lib/clang/{12.0.1 → 14.0.0}/include/ia32intrin.h +6 -6
  52. package/lib/clang/{12.0.1 → 14.0.0}/include/immintrin.h +31 -13
  53. package/lib/clang/{12.0.1 → 14.0.0}/include/intrin.h +63 -19
  54. package/lib/clang/{12.0.1 → 14.0.0}/include/keylockerintrin.h +32 -8
  55. package/lib/clang/{12.0.1 → 14.0.0}/include/limits.h +20 -0
  56. package/lib/clang/{12.0.1 → 14.0.0}/include/mmintrin.h +4 -0
  57. package/lib/clang/{12.0.1 → 14.0.0}/include/nmmintrin.h +4 -0
  58. package/lib/clang/{12.0.1 → 14.0.0}/include/opencl-c-base.h +206 -7
  59. package/lib/clang/{12.0.1 → 14.0.0}/include/opencl-c.h +2187 -797
  60. package/lib/clang/14.0.0/include/openmp_wrappers/__clang_openmp_device_functions.h +106 -0
  61. package/lib/clang/{12.0.1 → 14.0.0}/include/openmp_wrappers/cmath +54 -0
  62. package/lib/clang/{12.0.1 → 14.0.0}/include/openmp_wrappers/complex +11 -8
  63. package/lib/clang/{12.0.1 → 14.0.0}/include/openmp_wrappers/complex.h +9 -1
  64. package/lib/clang/{12.0.1 → 14.0.0}/include/openmp_wrappers/math.h +10 -0
  65. package/lib/clang/{12.0.1 → 14.0.0}/include/openmp_wrappers/new +2 -24
  66. package/lib/clang/{12.0.1 → 14.0.0}/include/pmmintrin.h +4 -0
  67. package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/emmintrin.h +3 -2
  68. package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/mm_malloc.h +2 -2
  69. package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/mmintrin.h +3 -2
  70. package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/pmmintrin.h +3 -2
  71. package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/smmintrin.h +4 -3
  72. package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/tmmintrin.h +3 -2
  73. package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/xmmintrin.h +3 -2
  74. package/lib/clang/{12.0.1 → 14.0.0}/include/prfchwintrin.h +5 -2
  75. package/lib/clang/14.0.0/include/riscv_vector.h +95423 -0
  76. package/lib/clang/{12.0.1 → 14.0.0}/include/smmintrin.h +80 -159
  77. package/lib/clang/{12.0.1 → 14.0.0}/include/stdatomic.h +14 -1
  78. package/lib/clang/{12.0.1 → 14.0.0}/include/stdint.h +168 -0
  79. package/lib/clang/{12.0.1 → 14.0.0}/include/tmmintrin.h +10 -6
  80. package/lib/clang/{12.0.1 → 14.0.0}/include/uintrintrin.h +7 -0
  81. package/lib/clang/{12.0.1 → 14.0.0}/include/unwind.h +2 -1
  82. package/lib/clang/{12.0.1 → 14.0.0}/include/vaesintrin.h +22 -21
  83. package/lib/clang/{12.0.1 → 14.0.0}/include/vecintrin.h +206 -77
  84. package/lib/clang/{12.0.1 → 14.0.0}/include/vpclmulqdqintrin.h +8 -6
  85. package/lib/clang/14.0.0/include/wasm_simd128.h +1877 -0
  86. package/lib/clang/{12.0.1 → 14.0.0}/include/wmmintrin.h +4 -0
  87. package/lib/clang/{12.0.1 → 14.0.0}/include/x86gprintrin.h +12 -0
  88. package/lib/clang/{12.0.1 → 14.0.0}/include/xmmintrin.h +9 -5
  89. package/lib/clang/{12.0.1 → 14.0.0}/include/xopintrin.h +31 -31
  90. package/package.json +6 -6
  91. package/lib/clang/12.0.1/include/__clang_hip_runtime_wrapper.h +0 -69
  92. package/lib/clang/12.0.1/include/amxintrin.h +0 -278
  93. package/lib/clang/12.0.1/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -42
  94. package/lib/clang/12.0.1/include/wasm_simd128.h +0 -1167
  95. /package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_builtin_vars.h +0 -0
  96. /package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_cmath.h +0 -0
  97. /package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_math_forward_declares.h +0 -0
  98. /package/lib/clang/{12.0.1 → 14.0.0}/include/__stddef_max_align_t.h +0 -0
  99. /package/lib/clang/{12.0.1 → 14.0.0}/include/__wmmintrin_pclmul.h +0 -0
  100. /package/lib/clang/{12.0.1 → 14.0.0}/include/adxintrin.h +0 -0
  101. /package/lib/clang/{12.0.1 → 14.0.0}/include/arm64intr.h +0 -0
  102. /package/lib/clang/{12.0.1 → 14.0.0}/include/arm_bf16.h +0 -0
  103. /package/lib/clang/{12.0.1 → 14.0.0}/include/arm_cde.h +0 -0
  104. /package/lib/clang/{12.0.1 → 14.0.0}/include/arm_cmse.h +0 -0
  105. /package/lib/clang/{12.0.1 → 14.0.0}/include/arm_fp16.h +0 -0
  106. /package/lib/clang/{12.0.1 → 14.0.0}/include/arm_mve.h +0 -0
  107. /package/lib/clang/{12.0.1 → 14.0.0}/include/armintr.h +0 -0
  108. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512bitalgintrin.h +0 -0
  109. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512cdintrin.h +0 -0
  110. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512ifmaintrin.h +0 -0
  111. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512ifmavlintrin.h +0 -0
  112. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512pfintrin.h +0 -0
  113. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vbmiintrin.h +0 -0
  114. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vbmivlintrin.h +0 -0
  115. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlbitalgintrin.h +0 -0
  116. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlcdintrin.h +0 -0
  117. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlvp2intersectintrin.h +0 -0
  118. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vnniintrin.h +0 -0
  119. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vp2intersectintrin.h +0 -0
  120. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vpopcntdqintrin.h +0 -0
  121. /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vpopcntdqvlintrin.h +0 -0
  122. /package/lib/clang/{12.0.1 → 14.0.0}/include/avxvnniintrin.h +0 -0
  123. /package/lib/clang/{12.0.1 → 14.0.0}/include/bmi2intrin.h +0 -0
  124. /package/lib/clang/{12.0.1 → 14.0.0}/include/bmiintrin.h +0 -0
  125. /package/lib/clang/{12.0.1 → 14.0.0}/include/cet.h +0 -0
  126. /package/lib/clang/{12.0.1 → 14.0.0}/include/cldemoteintrin.h +0 -0
  127. /package/lib/clang/{12.0.1 → 14.0.0}/include/clflushoptintrin.h +0 -0
  128. /package/lib/clang/{12.0.1 → 14.0.0}/include/clwbintrin.h +0 -0
  129. /package/lib/clang/{12.0.1 → 14.0.0}/include/clzerointrin.h +0 -0
  130. /package/lib/clang/{12.0.1 → 14.0.0}/include/cuda_wrappers/algorithm +0 -0
  131. /package/lib/clang/{12.0.1 → 14.0.0}/include/cuda_wrappers/new +0 -0
  132. /package/lib/clang/{12.0.1 → 14.0.0}/include/enqcmdintrin.h +0 -0
  133. /package/lib/clang/{12.0.1 → 14.0.0}/include/fma4intrin.h +0 -0
  134. /package/lib/clang/{12.0.1 → 14.0.0}/include/fmaintrin.h +0 -0
  135. /package/lib/clang/{12.0.1 → 14.0.0}/include/fxsrintrin.h +0 -0
  136. /package/lib/clang/{12.0.1 → 14.0.0}/include/hresetintrin.h +0 -0
  137. /package/lib/clang/{12.0.1 → 14.0.0}/include/htmintrin.h +0 -0
  138. /package/lib/clang/{12.0.1 → 14.0.0}/include/htmxlintrin.h +0 -0
  139. /package/lib/clang/{12.0.1 → 14.0.0}/include/inttypes.h +0 -0
  140. /package/lib/clang/{12.0.1 → 14.0.0}/include/invpcidintrin.h +0 -0
  141. /package/lib/clang/{12.0.1 → 14.0.0}/include/iso646.h +0 -0
  142. /package/lib/clang/{12.0.1 → 14.0.0}/include/lwpintrin.h +0 -0
  143. /package/lib/clang/{12.0.1 → 14.0.0}/include/lzcntintrin.h +0 -0
  144. /package/lib/clang/{12.0.1 → 14.0.0}/include/mm3dnow.h +0 -0
  145. /package/lib/clang/{12.0.1 → 14.0.0}/include/mm_malloc.h +0 -0
  146. /package/lib/clang/{12.0.1 → 14.0.0}/include/module.modulemap +0 -0
  147. /package/lib/clang/{12.0.1 → 14.0.0}/include/movdirintrin.h +0 -0
  148. /package/lib/clang/{12.0.1 → 14.0.0}/include/msa.h +0 -0
  149. /package/lib/clang/{12.0.1 → 14.0.0}/include/mwaitxintrin.h +0 -0
  150. /package/lib/clang/{12.0.1 → 14.0.0}/include/openmp_wrappers/complex_cmath.h +0 -0
  151. /package/lib/clang/{12.0.1 → 14.0.0}/include/pconfigintrin.h +0 -0
  152. /package/lib/clang/{12.0.1 → 14.0.0}/include/pkuintrin.h +0 -0
  153. /package/lib/clang/{12.0.1 → 14.0.0}/include/popcntintrin.h +0 -0
  154. /package/lib/clang/{12.0.1 → 14.0.0}/include/ptwriteintrin.h +0 -0
  155. /package/lib/clang/{12.0.1 → 14.0.0}/include/rdseedintrin.h +0 -0
  156. /package/lib/clang/{12.0.1 → 14.0.0}/include/rtmintrin.h +0 -0
  157. /package/lib/clang/{12.0.1 → 14.0.0}/include/s390intrin.h +0 -0
  158. /package/lib/clang/{12.0.1 → 14.0.0}/include/serializeintrin.h +0 -0
  159. /package/lib/clang/{12.0.1 → 14.0.0}/include/sgxintrin.h +0 -0
  160. /package/lib/clang/{12.0.1 → 14.0.0}/include/shaintrin.h +0 -0
  161. /package/lib/clang/{12.0.1 → 14.0.0}/include/stdalign.h +0 -0
  162. /package/lib/clang/{12.0.1 → 14.0.0}/include/stdarg.h +0 -0
  163. /package/lib/clang/{12.0.1 → 14.0.0}/include/stdbool.h +0 -0
  164. /package/lib/clang/{12.0.1 → 14.0.0}/include/stddef.h +0 -0
  165. /package/lib/clang/{12.0.1 → 14.0.0}/include/stdnoreturn.h +0 -0
  166. /package/lib/clang/{12.0.1 → 14.0.0}/include/tbmintrin.h +0 -0
  167. /package/lib/clang/{12.0.1 → 14.0.0}/include/tgmath.h +0 -0
  168. /package/lib/clang/{12.0.1 → 14.0.0}/include/tsxldtrkintrin.h +0 -0
  169. /package/lib/clang/{12.0.1 → 14.0.0}/include/vadefs.h +0 -0
  170. /package/lib/clang/{12.0.1 → 14.0.0}/include/varargs.h +0 -0
  171. /package/lib/clang/{12.0.1 → 14.0.0}/include/waitpkgintrin.h +0 -0
  172. /package/lib/clang/{12.0.1 → 14.0.0}/include/wbnoinvdintrin.h +0 -0
  173. /package/lib/clang/{12.0.1 → 14.0.0}/include/x86intrin.h +0 -0
  174. /package/lib/clang/{12.0.1 → 14.0.0}/include/xsavecintrin.h +0 -0
  175. /package/lib/clang/{12.0.1 → 14.0.0}/include/xsaveintrin.h +0 -0
  176. /package/lib/clang/{12.0.1 → 14.0.0}/include/xsaveoptintrin.h +0 -0
  177. /package/lib/clang/{12.0.1 → 14.0.0}/include/xsavesintrin.h +0 -0
  178. /package/lib/clang/{12.0.1 → 14.0.0}/include/xtestintrin.h +0 -0
@@ -0,0 +1,106 @@
1
+ /*===- __clang_openmp_device_functions.h - OpenMP device function declares -===
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 __CLANG_OPENMP_DEVICE_FUNCTIONS_H__
11
+ #define __CLANG_OPENMP_DEVICE_FUNCTIONS_H__
12
+
13
+ #ifndef _OPENMP
14
+ #error "This file is for OpenMP compilation only."
15
+ #endif
16
+
17
+ #ifdef __cplusplus
18
+ extern "C" {
19
+ #endif
20
+
21
+ #pragma omp begin declare variant match( \
22
+ device = {arch(nvptx, nvptx64)}, implementation = {extension(match_any)})
23
+
24
+ #define __CUDA__
25
+ #define __OPENMP_NVPTX__
26
+
27
+ /// Include declarations for libdevice functions.
28
+ #include <__clang_cuda_libdevice_declares.h>
29
+
30
+ /// Provide definitions for these functions.
31
+ #include <__clang_cuda_device_functions.h>
32
+
33
+ #undef __OPENMP_NVPTX__
34
+ #undef __CUDA__
35
+
36
+ #pragma omp end declare variant
37
+
38
+ #ifdef __AMDGCN__
39
+ #pragma omp begin declare variant match(device = {arch(amdgcn)})
40
+
41
+ // Import types which will be used by __clang_hip_libdevice_declares.h
42
+ #ifndef __cplusplus
43
+ #include <stdbool.h>
44
+ #include <stdint.h>
45
+ #endif
46
+
47
+ #define __OPENMP_AMDGCN__
48
+ #pragma push_macro("__device__")
49
+ #define __device__
50
+
51
+ /// Include declarations for libdevice functions.
52
+ #include <__clang_hip_libdevice_declares.h>
53
+
54
+ #pragma pop_macro("__device__")
55
+ #undef __OPENMP_AMDGCN__
56
+
57
+ #pragma omp end declare variant
58
+ #endif
59
+
60
+ #ifdef __cplusplus
61
+ } // extern "C"
62
+ #endif
63
+
64
+ // Ensure we make `_ZdlPv`, aka. `operator delete(void*)` available without the
65
+ // need to `include <new>` in C++ mode.
66
+ #ifdef __cplusplus
67
+
68
+ // We require malloc/free.
69
+ #include <cstdlib>
70
+
71
+ #pragma push_macro("OPENMP_NOEXCEPT")
72
+ #if __cplusplus >= 201103L
73
+ #define OPENMP_NOEXCEPT noexcept
74
+ #else
75
+ #define OPENMP_NOEXCEPT
76
+ #endif
77
+
78
+ // Device overrides for non-placement new and delete.
79
+ inline void *operator new(__SIZE_TYPE__ size) {
80
+ if (size == 0)
81
+ size = 1;
82
+ return ::malloc(size);
83
+ }
84
+
85
+ inline void *operator new[](__SIZE_TYPE__ size) { return ::operator new(size); }
86
+
87
+ inline void operator delete(void *ptr)OPENMP_NOEXCEPT { ::free(ptr); }
88
+
89
+ inline void operator delete[](void *ptr) OPENMP_NOEXCEPT {
90
+ ::operator delete(ptr);
91
+ }
92
+
93
+ // Sized delete, C++14 only.
94
+ #if __cplusplus >= 201402L
95
+ inline void operator delete(void *ptr, __SIZE_TYPE__ size)OPENMP_NOEXCEPT {
96
+ ::operator delete(ptr);
97
+ }
98
+ inline void operator delete[](void *ptr, __SIZE_TYPE__ size) OPENMP_NOEXCEPT {
99
+ ::operator delete(ptr);
100
+ }
101
+ #endif
102
+
103
+ #pragma pop_macro("OPENMP_NOEXCEPT")
104
+ #endif
105
+
106
+ #endif
@@ -75,4 +75,58 @@ __DEVICE__ float tgamma(float __x) { return ::tgammaf(__x); }
75
75
 
76
76
  #pragma omp end declare variant
77
77
 
78
+ #ifdef __AMDGCN__
79
+ #pragma omp begin declare variant match(device = {arch(amdgcn)})
80
+
81
+ #pragma push_macro("__constant__")
82
+ #define __constant__ __attribute__((constant))
83
+ #define __OPENMP_AMDGCN__
84
+
85
+ #include <__clang_hip_cmath.h>
86
+
87
+ #pragma pop_macro("__constant__")
88
+ #undef __OPENMP_AMDGCN__
89
+
90
+ // Define overloads otherwise which are absent
91
+ #define __DEVICE__ static constexpr __attribute__((always_inline, nothrow))
92
+
93
+ __DEVICE__ float acos(float __x) { return ::acosf(__x); }
94
+ __DEVICE__ float acosh(float __x) { return ::acoshf(__x); }
95
+ __DEVICE__ float asin(float __x) { return ::asinf(__x); }
96
+ __DEVICE__ float asinh(float __x) { return ::asinhf(__x); }
97
+ __DEVICE__ float atan(float __x) { return ::atanf(__x); }
98
+ __DEVICE__ float atan2(float __x, float __y) { return ::atan2f(__x, __y); }
99
+ __DEVICE__ float atanh(float __x) { return ::atanhf(__x); }
100
+ __DEVICE__ float cbrt(float __x) { return ::cbrtf(__x); }
101
+ __DEVICE__ float cosh(float __x) { return ::coshf(__x); }
102
+ __DEVICE__ float erf(float __x) { return ::erff(__x); }
103
+ __DEVICE__ float erfc(float __x) { return ::erfcf(__x); }
104
+ __DEVICE__ float exp2(float __x) { return ::exp2f(__x); }
105
+ __DEVICE__ float expm1(float __x) { return ::expm1f(__x); }
106
+ __DEVICE__ float fdim(float __x, float __y) { return ::fdimf(__x, __y); }
107
+ __DEVICE__ float hypot(float __x, float __y) { return ::hypotf(__x, __y); }
108
+ __DEVICE__ int ilogb(float __x) { return ::ilogbf(__x); }
109
+ __DEVICE__ float ldexp(float __arg, int __exp) {
110
+ return ::ldexpf(__arg, __exp);
111
+ }
112
+ __DEVICE__ float lgamma(float __x) { return ::lgammaf(__x); }
113
+ __DEVICE__ float log1p(float __x) { return ::log1pf(__x); }
114
+ __DEVICE__ float logb(float __x) { return ::logbf(__x); }
115
+ __DEVICE__ float nextafter(float __x, float __y) {
116
+ return ::nextafterf(__x, __y);
117
+ }
118
+ __DEVICE__ float remainder(float __x, float __y) {
119
+ return ::remainderf(__x, __y);
120
+ }
121
+ __DEVICE__ float scalbn(float __x, int __y) { return ::scalbnf(__x, __y); }
122
+ __DEVICE__ float sinh(float __x) { return ::sinhf(__x); }
123
+ __DEVICE__ float tan(float __x) { return ::tanf(__x); }
124
+ __DEVICE__ float tanh(float __x) { return ::tanhf(__x); }
125
+ __DEVICE__ float tgamma(float __x) { return ::tgammaf(__x); }
126
+
127
+ #undef __DEVICE__
128
+
129
+ #pragma omp end declare variant
130
+ #endif // __AMDGCN__
131
+
78
132
  #endif
@@ -17,18 +17,23 @@
17
17
  // We require std::math functions in the complex builtins below.
18
18
  #include <cmath>
19
19
 
20
- #define __CUDA__
20
+ #ifdef __NVPTX__
21
21
  #define __OPENMP_NVPTX__
22
22
  #include <__clang_cuda_complex_builtins.h>
23
23
  #undef __OPENMP_NVPTX__
24
+ #endif // __NVPTX__
25
+
26
+ #ifdef __AMDGCN__
27
+ #define __OPENMP_AMDGCN__
28
+ #include <__clang_cuda_complex_builtins.h>
29
+ #undef __OPENMP_AMDGCN__
30
+ #endif // __AMDGCN__
31
+
24
32
  #endif
25
33
 
26
34
  // Grab the host header too.
27
35
  #include_next <complex>
28
36
 
29
-
30
- #ifdef __cplusplus
31
-
32
37
  // If we are compiling against libc++, the macro _LIBCPP_STD_VER should be set
33
38
  // after including <cmath> above. Since the complex header we use is a
34
39
  // simplified version of the libc++, we don't need it in this case. If we
@@ -40,13 +45,11 @@
40
45
  #ifndef _LIBCPP_STD_VER
41
46
 
42
47
  #pragma omp begin declare variant match( \
43
- device = {arch(nvptx, nvptx64)}, \
48
+ device = {arch(amdgcn, nvptx, nvptx64)}, \
44
49
  implementation = {extension(match_any, allow_templates)})
45
50
 
46
51
  #include <complex_cmath.h>
47
52
 
48
53
  #pragma omp end declare variant
49
54
 
50
- #endif
51
-
52
- #endif
55
+ #endif // _LIBCPP_STD_VER
@@ -17,11 +17,19 @@
17
17
  // We require math functions in the complex builtins below.
18
18
  #include <math.h>
19
19
 
20
- #define __CUDA__
20
+ #ifdef __NVPTX__
21
21
  #define __OPENMP_NVPTX__
22
22
  #include <__clang_cuda_complex_builtins.h>
23
23
  #undef __OPENMP_NVPTX__
24
24
  #endif
25
25
 
26
+ #ifdef __AMDGCN__
27
+ #define __OPENMP_AMDGCN__
28
+ #include <__clang_cuda_complex_builtins.h>
29
+ #undef __OPENMP_AMDGCN__
30
+ #endif
31
+
32
+ #endif
33
+
26
34
  // Grab the host header too.
27
35
  #include_next <complex.h>
@@ -48,4 +48,14 @@
48
48
 
49
49
  #pragma omp end declare variant
50
50
 
51
+ #ifdef __AMDGCN__
52
+ #pragma omp begin declare variant match(device = {arch(amdgcn)})
53
+
54
+ #define __OPENMP_AMDGCN__
55
+ #include <__clang_hip_math.h>
56
+ #undef __OPENMP_AMDGCN__
57
+
58
+ #pragma omp end declare variant
59
+ #endif
60
+
51
61
  #endif
@@ -9,6 +9,8 @@
9
9
  #ifndef __CLANG_OPENMP_WRAPPERS_NEW
10
10
  #define __CLANG_OPENMP_WRAPPERS_NEW
11
11
 
12
+ // We need the system <new> for the std::nothrow_t. The new/delete operators
13
+ // which do not use nothrow_t are provided without the <new> header.
12
14
  #include_next <new>
13
15
 
14
16
  #if defined(__NVPTX__) && defined(_OPENMP)
@@ -22,48 +24,24 @@
22
24
  #define OPENMP_NOEXCEPT
23
25
  #endif
24
26
 
25
- // Device overrides for non-placement new and delete.
26
- inline void *operator new(__SIZE_TYPE__ size) {
27
- if (size == 0)
28
- size = 1;
29
- return ::malloc(size);
30
- }
31
27
  inline void *operator new(__SIZE_TYPE__ size,
32
28
  const std::nothrow_t &) OPENMP_NOEXCEPT {
33
29
  return ::operator new(size);
34
30
  }
35
31
 
36
- inline void *operator new[](__SIZE_TYPE__ size) { return ::operator new(size); }
37
32
  inline void *operator new[](__SIZE_TYPE__ size, const std::nothrow_t &) {
38
33
  return ::operator new(size);
39
34
  }
40
35
 
41
- inline void operator delete(void *ptr)OPENMP_NOEXCEPT {
42
- if (ptr)
43
- ::free(ptr);
44
- }
45
36
  inline void operator delete(void *ptr, const std::nothrow_t &)OPENMP_NOEXCEPT {
46
37
  ::operator delete(ptr);
47
38
  }
48
39
 
49
- inline void operator delete[](void *ptr) OPENMP_NOEXCEPT {
50
- ::operator delete(ptr);
51
- }
52
40
  inline void operator delete[](void *ptr,
53
41
  const std::nothrow_t &) OPENMP_NOEXCEPT {
54
42
  ::operator delete(ptr);
55
43
  }
56
44
 
57
- // Sized delete, C++14 only.
58
- #if __cplusplus >= 201402L
59
- inline void operator delete(void *ptr, __SIZE_TYPE__ size)OPENMP_NOEXCEPT {
60
- ::operator delete(ptr);
61
- }
62
- inline void operator delete[](void *ptr, __SIZE_TYPE__ size) OPENMP_NOEXCEPT {
63
- ::operator delete(ptr);
64
- }
65
- #endif
66
-
67
45
  #pragma pop_macro("OPENMP_NOEXCEPT")
68
46
  #endif
69
47
 
@@ -10,6 +10,10 @@
10
10
  #ifndef __PMMINTRIN_H
11
11
  #define __PMMINTRIN_H
12
12
 
13
+ #if !defined(__i386__) && !defined(__x86_64__)
14
+ #error "This header is only meant to be used on x86 and x64 architecture"
15
+ #endif
16
+
13
17
  #include <emmintrin.h>
14
18
 
15
19
  /* Define the default attributes for the functions in this file. */
@@ -35,7 +35,7 @@
35
35
  #ifndef EMMINTRIN_H_
36
36
  #define EMMINTRIN_H_
37
37
 
38
- #if defined(__linux__) && defined(__ppc64__)
38
+ #if defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__))
39
39
 
40
40
  #include <altivec.h>
41
41
 
@@ -2319,6 +2319,7 @@ _mm_castsi128_pd(__m128i __A)
2319
2319
 
2320
2320
  #else
2321
2321
  #include_next <emmintrin.h>
2322
- #endif /* defined(__linux__) && defined(__ppc64__) */
2322
+ #endif /* defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__)) \
2323
+ */
2323
2324
 
2324
2325
  #endif /* EMMINTRIN_H_ */
@@ -10,7 +10,7 @@
10
10
  #ifndef _MM_MALLOC_H_INCLUDED
11
11
  #define _MM_MALLOC_H_INCLUDED
12
12
 
13
- #if defined(__linux__) && defined(__ppc64__)
13
+ #if defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__))
14
14
 
15
15
  #include <stdlib.h>
16
16
 
@@ -19,7 +19,7 @@
19
19
  #ifndef __cplusplus
20
20
  extern int posix_memalign (void **, size_t, size_t);
21
21
  #else
22
- extern "C" int posix_memalign (void **, size_t, size_t) throw ();
22
+ extern "C" int posix_memalign (void **, size_t, size_t);
23
23
  #endif
24
24
 
25
25
  static __inline void *
@@ -35,7 +35,7 @@
35
35
  #ifndef _MMINTRIN_H_INCLUDED
36
36
  #define _MMINTRIN_H_INCLUDED
37
37
 
38
- #if defined(__linux__) && defined(__ppc64__)
38
+ #if defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__))
39
39
 
40
40
  #include <altivec.h>
41
41
  /* The Intel API is flexible enough that we must allow aliasing with other
@@ -1445,6 +1445,7 @@ extern __inline __m64
1445
1445
 
1446
1446
  #else
1447
1447
  #include_next <mmintrin.h>
1448
- #endif /* defined(__linux__) && defined(__ppc64__) */
1448
+ #endif /* defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__)) \
1449
+ */
1449
1450
 
1450
1451
  #endif /* _MMINTRIN_H_INCLUDED */
@@ -38,7 +38,7 @@
38
38
  #ifndef PMMINTRIN_H_
39
39
  #define PMMINTRIN_H_
40
40
 
41
- #if defined(__linux__) && defined(__ppc64__)
41
+ #if defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__))
42
42
 
43
43
  /* We need definitions from the SSE2 and SSE header files*/
44
44
  #include <emmintrin.h>
@@ -145,6 +145,7 @@ _mm_lddqu_si128 (__m128i const *__P)
145
145
 
146
146
  #else
147
147
  #include_next <pmmintrin.h>
148
- #endif /* defined(__linux__) && defined(__ppc64__) */
148
+ #endif /* defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__)) \
149
+ */
149
150
 
150
151
  #endif /* PMMINTRIN_H_ */
@@ -29,10 +29,10 @@
29
29
  #ifndef SMMINTRIN_H_
30
30
  #define SMMINTRIN_H_
31
31
 
32
- #if defined(__linux__) && defined(__ppc64__)
32
+ #if defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__))
33
33
 
34
34
  #include <altivec.h>
35
- #include <emmintrin.h>
35
+ #include <tmmintrin.h>
36
36
 
37
37
  extern __inline int
38
38
  __attribute__((__gnu_inline__, __always_inline__, __artificial__))
@@ -104,6 +104,7 @@ extern __inline __m128i
104
104
 
105
105
  #else
106
106
  #include_next <smmintrin.h>
107
- #endif /* defined(__linux__) && defined(__ppc64__) */
107
+ #endif /* defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__)) \
108
+ */
108
109
 
109
110
  #endif /* _SMMINTRIN_H_ */
@@ -25,7 +25,7 @@
25
25
  #ifndef TMMINTRIN_H_
26
26
  #define TMMINTRIN_H_
27
27
 
28
- #if defined(__linux__) && defined(__ppc64__)
28
+ #if defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__))
29
29
 
30
30
  #include <altivec.h>
31
31
 
@@ -490,6 +490,7 @@ _mm_mulhrs_pi16 (__m64 __A, __m64 __B)
490
490
 
491
491
  #else
492
492
  #include_next <tmmintrin.h>
493
- #endif /* defined(__linux__) && defined(__ppc64__) */
493
+ #endif /* defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__)) \
494
+ */
494
495
 
495
496
  #endif /* TMMINTRIN_H_ */
@@ -34,7 +34,7 @@
34
34
  #ifndef _XMMINTRIN_H_INCLUDED
35
35
  #define _XMMINTRIN_H_INCLUDED
36
36
 
37
- #if defined(__linux__) && defined(__ppc64__)
37
+ #if defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__))
38
38
 
39
39
  /* Define four value permute mask */
40
40
  #define _MM_SHUFFLE(w,x,y,z) (((w) << 6) | ((x) << 4) | ((y) << 2) | (z))
@@ -1838,6 +1838,7 @@ do { \
1838
1838
 
1839
1839
  #else
1840
1840
  #include_next <xmmintrin.h>
1841
- #endif /* defined(__linux__) && defined(__ppc64__) */
1841
+ #endif /* defined(__ppc64__) && (defined(__linux__) || defined(__FreeBSD__)) \
1842
+ */
1842
1843
 
1843
1844
  #endif /* _XMMINTRIN_H_INCLUDED */
@@ -47,9 +47,12 @@ _m_prefetch(void *__P)
47
47
  /// \param __P
48
48
  /// A pointer specifying the memory address to be prefetched.
49
49
  static __inline__ void __attribute__((__always_inline__, __nodebug__))
50
- _m_prefetchw(void *__P)
50
+ _m_prefetchw(volatile const void *__P)
51
51
  {
52
- __builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
52
+ #pragma clang diagnostic push
53
+ #pragma clang diagnostic ignored "-Wcast-qual"
54
+ __builtin_prefetch ((const void*)__P, 1, 3 /* _MM_HINT_T0 */);
55
+ #pragma clang diagnostic pop
53
56
  }
54
57
 
55
58
  #endif /* __PRFCHWINTRIN_H */