@cpp-linter/clang-tidy-win32-x64 16.0.3 → 17.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/README.md +2 -2
  2. package/bin/clang-tidy.exe +2 -2
  3. package/lib/clang/{16 → 17}/include/__clang_cuda_intrinsics.h +191 -0
  4. package/lib/clang/{16 → 17}/include/__clang_cuda_math.h +1 -1
  5. package/lib/clang/{16 → 17}/include/__clang_hip_cmath.h +1 -1
  6. package/lib/clang/{16 → 17}/include/__clang_hip_libdevice_declares.h +32 -30
  7. package/lib/clang/{16 → 17}/include/__clang_hip_math.h +56 -71
  8. package/lib/clang/{16 → 17}/include/__clang_hip_runtime_wrapper.h +13 -0
  9. package/lib/clang/17/include/adxintrin.h +227 -0
  10. package/lib/clang/{16 → 17}/include/altivec.h +136 -124
  11. package/lib/clang/17/include/amxcomplexintrin.h +169 -0
  12. package/lib/clang/{16 → 17}/include/arm_acle.h +13 -9
  13. package/lib/clang/{16 → 17}/include/arm_neon.h +164 -1
  14. package/lib/clang/17/include/arm_sme_draft_spec_subject_to_change.h +642 -0
  15. package/lib/clang/{16 → 17}/include/arm_sve.h +68 -13
  16. package/lib/clang/17/include/avx2intrin.h +5263 -0
  17. package/lib/clang/{16 → 17}/include/avx512fintrin.h +17 -7
  18. package/lib/clang/{16 → 17}/include/avx512fp16intrin.h +12 -8
  19. package/lib/clang/{16 → 17}/include/avxintrin.h +20 -7
  20. package/lib/clang/17/include/avxvnniint16intrin.h +473 -0
  21. package/lib/clang/17/include/bmi2intrin.h +255 -0
  22. package/lib/clang/{16 → 17}/include/clflushoptintrin.h +9 -0
  23. package/lib/clang/{16 → 17}/include/clzerointrin.h +7 -5
  24. package/lib/clang/17/include/cuda_wrappers/bits/basic_string.h +9 -0
  25. package/lib/clang/17/include/cuda_wrappers/bits/basic_string.tcc +9 -0
  26. package/lib/clang/17/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
  27. package/lib/clang/17/include/fmaintrin.h +780 -0
  28. package/lib/clang/17/include/hlsl/hlsl_intrinsics.h +480 -0
  29. package/lib/clang/{16 → 17}/include/immintrin.h +116 -8
  30. package/lib/clang/{16 → 17}/include/limits.h +5 -1
  31. package/lib/clang/17/include/llvm_libc_wrappers/ctype.h +85 -0
  32. package/lib/clang/17/include/llvm_libc_wrappers/inttypes.h +34 -0
  33. package/lib/clang/17/include/llvm_libc_wrappers/stdio.h +34 -0
  34. package/lib/clang/17/include/llvm_libc_wrappers/stdlib.h +42 -0
  35. package/lib/clang/17/include/llvm_libc_wrappers/string.h +37 -0
  36. package/lib/clang/17/include/mwaitxintrin.h +62 -0
  37. package/lib/clang/{16 → 17}/include/opencl-c-base.h +3 -0
  38. package/lib/clang/{16 → 17}/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -1
  39. package/lib/clang/{16 → 17}/include/openmp_wrappers/new +1 -1
  40. package/lib/clang/{16 → 17}/include/pmmintrin.h +12 -6
  41. package/lib/clang/{16 → 17}/include/ppc_wrappers/emmintrin.h +2 -1
  42. package/lib/clang/{16 → 17}/include/ppc_wrappers/smmintrin.h +2 -2
  43. package/lib/clang/17/include/rdseedintrin.h +105 -0
  44. package/lib/clang/17/include/riscv_ntlh.h +28 -0
  45. package/lib/clang/17/include/riscv_vector.h +400 -0
  46. package/lib/clang/17/include/sha512intrin.h +200 -0
  47. package/lib/clang/17/include/shaintrin.h +189 -0
  48. package/lib/clang/17/include/sifive_vector.h +16 -0
  49. package/lib/clang/17/include/sm3intrin.h +238 -0
  50. package/lib/clang/17/include/sm4intrin.h +269 -0
  51. package/lib/clang/{16 → 17}/include/stdalign.h +5 -0
  52. package/lib/clang/{16 → 17}/include/stdatomic.h +9 -2
  53. package/lib/clang/{16 → 17}/include/stddef.h +5 -0
  54. package/lib/clang/{16 → 17}/include/wasm_simd128.h +132 -12
  55. package/lib/clang/17/include/xsavecintrin.h +84 -0
  56. package/package.json +6 -6
  57. package/lib/clang/16/include/adxintrin.h +0 -72
  58. package/lib/clang/16/include/avx2intrin.h +0 -1148
  59. package/lib/clang/16/include/bmi2intrin.h +0 -81
  60. package/lib/clang/16/include/fmaintrin.h +0 -216
  61. package/lib/clang/16/include/hlsl/hlsl_intrinsics.h +0 -223
  62. package/lib/clang/16/include/mwaitxintrin.h +0 -33
  63. package/lib/clang/16/include/rdseedintrin.h +0 -42
  64. package/lib/clang/16/include/riscv_vector.h +0 -211
  65. package/lib/clang/16/include/shaintrin.h +0 -61
  66. package/lib/clang/16/include/xsavecintrin.h +0 -34
  67. /package/lib/clang/{16 → 17}/include/__clang_cuda_builtin_vars.h +0 -0
  68. /package/lib/clang/{16 → 17}/include/__clang_cuda_cmath.h +0 -0
  69. /package/lib/clang/{16 → 17}/include/__clang_cuda_complex_builtins.h +0 -0
  70. /package/lib/clang/{16 → 17}/include/__clang_cuda_device_functions.h +0 -0
  71. /package/lib/clang/{16 → 17}/include/__clang_cuda_libdevice_declares.h +0 -0
  72. /package/lib/clang/{16 → 17}/include/__clang_cuda_math_forward_declares.h +0 -0
  73. /package/lib/clang/{16 → 17}/include/__clang_cuda_runtime_wrapper.h +0 -0
  74. /package/lib/clang/{16 → 17}/include/__clang_cuda_texture_intrinsics.h +0 -0
  75. /package/lib/clang/{16 → 17}/include/__clang_hip_stdlib.h +0 -0
  76. /package/lib/clang/{16 → 17}/include/__stddef_max_align_t.h +0 -0
  77. /package/lib/clang/{16 → 17}/include/__wmmintrin_aes.h +0 -0
  78. /package/lib/clang/{16 → 17}/include/__wmmintrin_pclmul.h +0 -0
  79. /package/lib/clang/{16 → 17}/include/ammintrin.h +0 -0
  80. /package/lib/clang/{16 → 17}/include/amxfp16intrin.h +0 -0
  81. /package/lib/clang/{16 → 17}/include/amxintrin.h +0 -0
  82. /package/lib/clang/{16 → 17}/include/arm64intr.h +0 -0
  83. /package/lib/clang/{16 → 17}/include/arm_bf16.h +0 -0
  84. /package/lib/clang/{16 → 17}/include/arm_cde.h +0 -0
  85. /package/lib/clang/{16 → 17}/include/arm_cmse.h +0 -0
  86. /package/lib/clang/{16 → 17}/include/arm_fp16.h +0 -0
  87. /package/lib/clang/{16 → 17}/include/arm_mve.h +0 -0
  88. /package/lib/clang/{16 → 17}/include/arm_neon_sve_bridge.h +0 -0
  89. /package/lib/clang/{16 → 17}/include/armintr.h +0 -0
  90. /package/lib/clang/{16 → 17}/include/avx512bf16intrin.h +0 -0
  91. /package/lib/clang/{16 → 17}/include/avx512bitalgintrin.h +0 -0
  92. /package/lib/clang/{16 → 17}/include/avx512bwintrin.h +0 -0
  93. /package/lib/clang/{16 → 17}/include/avx512cdintrin.h +0 -0
  94. /package/lib/clang/{16 → 17}/include/avx512dqintrin.h +0 -0
  95. /package/lib/clang/{16 → 17}/include/avx512erintrin.h +0 -0
  96. /package/lib/clang/{16 → 17}/include/avx512ifmaintrin.h +0 -0
  97. /package/lib/clang/{16 → 17}/include/avx512ifmavlintrin.h +0 -0
  98. /package/lib/clang/{16 → 17}/include/avx512pfintrin.h +0 -0
  99. /package/lib/clang/{16 → 17}/include/avx512vbmi2intrin.h +0 -0
  100. /package/lib/clang/{16 → 17}/include/avx512vbmiintrin.h +0 -0
  101. /package/lib/clang/{16 → 17}/include/avx512vbmivlintrin.h +0 -0
  102. /package/lib/clang/{16 → 17}/include/avx512vlbf16intrin.h +0 -0
  103. /package/lib/clang/{16 → 17}/include/avx512vlbitalgintrin.h +0 -0
  104. /package/lib/clang/{16 → 17}/include/avx512vlbwintrin.h +0 -0
  105. /package/lib/clang/{16 → 17}/include/avx512vlcdintrin.h +0 -0
  106. /package/lib/clang/{16 → 17}/include/avx512vldqintrin.h +0 -0
  107. /package/lib/clang/{16 → 17}/include/avx512vlfp16intrin.h +0 -0
  108. /package/lib/clang/{16 → 17}/include/avx512vlintrin.h +0 -0
  109. /package/lib/clang/{16 → 17}/include/avx512vlvbmi2intrin.h +0 -0
  110. /package/lib/clang/{16 → 17}/include/avx512vlvnniintrin.h +0 -0
  111. /package/lib/clang/{16 → 17}/include/avx512vlvp2intersectintrin.h +0 -0
  112. /package/lib/clang/{16 → 17}/include/avx512vnniintrin.h +0 -0
  113. /package/lib/clang/{16 → 17}/include/avx512vp2intersectintrin.h +0 -0
  114. /package/lib/clang/{16 → 17}/include/avx512vpopcntdqintrin.h +0 -0
  115. /package/lib/clang/{16 → 17}/include/avx512vpopcntdqvlintrin.h +0 -0
  116. /package/lib/clang/{16 → 17}/include/avxifmaintrin.h +0 -0
  117. /package/lib/clang/{16 → 17}/include/avxneconvertintrin.h +0 -0
  118. /package/lib/clang/{16 → 17}/include/avxvnniint8intrin.h +0 -0
  119. /package/lib/clang/{16 → 17}/include/avxvnniintrin.h +0 -0
  120. /package/lib/clang/{16 → 17}/include/bmiintrin.h +0 -0
  121. /package/lib/clang/{16 → 17}/include/builtins.h +0 -0
  122. /package/lib/clang/{16 → 17}/include/cet.h +0 -0
  123. /package/lib/clang/{16 → 17}/include/cetintrin.h +0 -0
  124. /package/lib/clang/{16 → 17}/include/cldemoteintrin.h +0 -0
  125. /package/lib/clang/{16 → 17}/include/clwbintrin.h +0 -0
  126. /package/lib/clang/{16 → 17}/include/cmpccxaddintrin.h +0 -0
  127. /package/lib/clang/{16 → 17}/include/cpuid.h +0 -0
  128. /package/lib/clang/{16 → 17}/include/crc32intrin.h +0 -0
  129. /package/lib/clang/{16 → 17}/include/cuda_wrappers/algorithm +0 -0
  130. /package/lib/clang/{16 → 17}/include/cuda_wrappers/cmath +0 -0
  131. /package/lib/clang/{16 → 17}/include/cuda_wrappers/complex +0 -0
  132. /package/lib/clang/{16 → 17}/include/cuda_wrappers/new +0 -0
  133. /package/lib/clang/{16 → 17}/include/emmintrin.h +0 -0
  134. /package/lib/clang/{16 → 17}/include/enqcmdintrin.h +0 -0
  135. /package/lib/clang/{16 → 17}/include/f16cintrin.h +0 -0
  136. /package/lib/clang/{16 → 17}/include/float.h +0 -0
  137. /package/lib/clang/{16 → 17}/include/fma4intrin.h +0 -0
  138. /package/lib/clang/{16 → 17}/include/fxsrintrin.h +0 -0
  139. /package/lib/clang/{16 → 17}/include/gfniintrin.h +0 -0
  140. /package/lib/clang/{16 → 17}/include/hexagon_circ_brev_intrinsics.h +0 -0
  141. /package/lib/clang/{16 → 17}/include/hexagon_protos.h +0 -0
  142. /package/lib/clang/{16 → 17}/include/hexagon_types.h +0 -0
  143. /package/lib/clang/{16 → 17}/include/hlsl/hlsl_basic_types.h +0 -0
  144. /package/lib/clang/{16 → 17}/include/hlsl.h +0 -0
  145. /package/lib/clang/{16 → 17}/include/hresetintrin.h +0 -0
  146. /package/lib/clang/{16 → 17}/include/htmintrin.h +0 -0
  147. /package/lib/clang/{16 → 17}/include/htmxlintrin.h +0 -0
  148. /package/lib/clang/{16 → 17}/include/hvx_hexagon_protos.h +0 -0
  149. /package/lib/clang/{16 → 17}/include/ia32intrin.h +0 -0
  150. /package/lib/clang/{16 → 17}/include/intrin.h +0 -0
  151. /package/lib/clang/{16 → 17}/include/inttypes.h +0 -0
  152. /package/lib/clang/{16 → 17}/include/invpcidintrin.h +0 -0
  153. /package/lib/clang/{16 → 17}/include/iso646.h +0 -0
  154. /package/lib/clang/{16 → 17}/include/keylockerintrin.h +0 -0
  155. /package/lib/clang/{16 → 17}/include/larchintrin.h +0 -0
  156. /package/lib/clang/{16 → 17}/include/lwpintrin.h +0 -0
  157. /package/lib/clang/{16 → 17}/include/lzcntintrin.h +0 -0
  158. /package/lib/clang/{16 → 17}/include/mm3dnow.h +0 -0
  159. /package/lib/clang/{16 → 17}/include/mm_malloc.h +0 -0
  160. /package/lib/clang/{16 → 17}/include/mmintrin.h +0 -0
  161. /package/lib/clang/{16 → 17}/include/module.modulemap +0 -0
  162. /package/lib/clang/{16 → 17}/include/movdirintrin.h +0 -0
  163. /package/lib/clang/{16 → 17}/include/msa.h +0 -0
  164. /package/lib/clang/{16 → 17}/include/nmmintrin.h +0 -0
  165. /package/lib/clang/{16 → 17}/include/opencl-c.h +0 -0
  166. /package/lib/clang/{16 → 17}/include/openmp_wrappers/cmath +0 -0
  167. /package/lib/clang/{16 → 17}/include/openmp_wrappers/complex +0 -0
  168. /package/lib/clang/{16 → 17}/include/openmp_wrappers/complex.h +0 -0
  169. /package/lib/clang/{16 → 17}/include/openmp_wrappers/complex_cmath.h +0 -0
  170. /package/lib/clang/{16 → 17}/include/openmp_wrappers/math.h +0 -0
  171. /package/lib/clang/{16 → 17}/include/pconfigintrin.h +0 -0
  172. /package/lib/clang/{16 → 17}/include/pkuintrin.h +0 -0
  173. /package/lib/clang/{16 → 17}/include/popcntintrin.h +0 -0
  174. /package/lib/clang/{16 → 17}/include/ppc_wrappers/bmi2intrin.h +0 -0
  175. /package/lib/clang/{16 → 17}/include/ppc_wrappers/bmiintrin.h +0 -0
  176. /package/lib/clang/{16 → 17}/include/ppc_wrappers/immintrin.h +0 -0
  177. /package/lib/clang/{16 → 17}/include/ppc_wrappers/mm_malloc.h +0 -0
  178. /package/lib/clang/{16 → 17}/include/ppc_wrappers/mmintrin.h +0 -0
  179. /package/lib/clang/{16 → 17}/include/ppc_wrappers/pmmintrin.h +0 -0
  180. /package/lib/clang/{16 → 17}/include/ppc_wrappers/tmmintrin.h +0 -0
  181. /package/lib/clang/{16 → 17}/include/ppc_wrappers/x86gprintrin.h +0 -0
  182. /package/lib/clang/{16 → 17}/include/ppc_wrappers/x86intrin.h +0 -0
  183. /package/lib/clang/{16 → 17}/include/ppc_wrappers/xmmintrin.h +0 -0
  184. /package/lib/clang/{16 → 17}/include/prfchiintrin.h +0 -0
  185. /package/lib/clang/{16 → 17}/include/prfchwintrin.h +0 -0
  186. /package/lib/clang/{16 → 17}/include/ptwriteintrin.h +0 -0
  187. /package/lib/clang/{16 → 17}/include/raointintrin.h +0 -0
  188. /package/lib/clang/{16 → 17}/include/rdpruintrin.h +0 -0
  189. /package/lib/clang/{16 → 17}/include/rtmintrin.h +0 -0
  190. /package/lib/clang/{16 → 17}/include/s390intrin.h +0 -0
  191. /package/lib/clang/{16 → 17}/include/serializeintrin.h +0 -0
  192. /package/lib/clang/{16 → 17}/include/sgxintrin.h +0 -0
  193. /package/lib/clang/{16 → 17}/include/smmintrin.h +0 -0
  194. /package/lib/clang/{16 → 17}/include/stdarg.h +0 -0
  195. /package/lib/clang/{16 → 17}/include/stdbool.h +0 -0
  196. /package/lib/clang/{16 → 17}/include/stdint.h +0 -0
  197. /package/lib/clang/{16 → 17}/include/stdnoreturn.h +0 -0
  198. /package/lib/clang/{16 → 17}/include/tbmintrin.h +0 -0
  199. /package/lib/clang/{16 → 17}/include/tgmath.h +0 -0
  200. /package/lib/clang/{16 → 17}/include/tmmintrin.h +0 -0
  201. /package/lib/clang/{16 → 17}/include/tsxldtrkintrin.h +0 -0
  202. /package/lib/clang/{16 → 17}/include/uintrintrin.h +0 -0
  203. /package/lib/clang/{16 → 17}/include/unwind.h +0 -0
  204. /package/lib/clang/{16 → 17}/include/vadefs.h +0 -0
  205. /package/lib/clang/{16 → 17}/include/vaesintrin.h +0 -0
  206. /package/lib/clang/{16 → 17}/include/varargs.h +0 -0
  207. /package/lib/clang/{16 → 17}/include/vecintrin.h +0 -0
  208. /package/lib/clang/{16 → 17}/include/velintrin.h +0 -0
  209. /package/lib/clang/{16 → 17}/include/velintrin_approx.h +0 -0
  210. /package/lib/clang/{16 → 17}/include/velintrin_gen.h +0 -0
  211. /package/lib/clang/{16 → 17}/include/vpclmulqdqintrin.h +0 -0
  212. /package/lib/clang/{16 → 17}/include/waitpkgintrin.h +0 -0
  213. /package/lib/clang/{16 → 17}/include/wbnoinvdintrin.h +0 -0
  214. /package/lib/clang/{16 → 17}/include/wmmintrin.h +0 -0
  215. /package/lib/clang/{16 → 17}/include/x86gprintrin.h +0 -0
  216. /package/lib/clang/{16 → 17}/include/x86intrin.h +0 -0
  217. /package/lib/clang/{16 → 17}/include/xmmintrin.h +0 -0
  218. /package/lib/clang/{16 → 17}/include/xopintrin.h +0 -0
  219. /package/lib/clang/{16 → 17}/include/xsaveintrin.h +0 -0
  220. /package/lib/clang/{16 → 17}/include/xsaveoptintrin.h +0 -0
  221. /package/lib/clang/{16 → 17}/include/xsavesintrin.h +0 -0
  222. /package/lib/clang/{16 → 17}/include/xtestintrin.h +0 -0
@@ -182,10 +182,10 @@ __DEVICE__
182
182
  float cbrtf(float __x) { return __ocml_cbrt_f32(__x); }
183
183
 
184
184
  __DEVICE__
185
- float ceilf(float __x) { return __ocml_ceil_f32(__x); }
185
+ float ceilf(float __x) { return __builtin_ceilf(__x); }
186
186
 
187
187
  __DEVICE__
188
- float copysignf(float __x, float __y) { return __ocml_copysign_f32(__x, __y); }
188
+ float copysignf(float __x, float __y) { return __builtin_copysignf(__x, __y); }
189
189
 
190
190
  __DEVICE__
191
191
  float cosf(float __x) { return __ocml_cos_f32(__x); }
@@ -221,10 +221,10 @@ __DEVICE__
221
221
  float exp10f(float __x) { return __ocml_exp10_f32(__x); }
222
222
 
223
223
  __DEVICE__
224
- float exp2f(float __x) { return __ocml_exp2_f32(__x); }
224
+ float exp2f(float __x) { return __builtin_exp2f(__x); }
225
225
 
226
226
  __DEVICE__
227
- float expf(float __x) { return __ocml_exp_f32(__x); }
227
+ float expf(float __x) { return __builtin_expf(__x); }
228
228
 
229
229
  __DEVICE__
230
230
  float expm1f(float __x) { return __ocml_expm1_f32(__x); }
@@ -239,33 +239,25 @@ __DEVICE__
239
239
  float fdividef(float __x, float __y) { return __x / __y; }
240
240
 
241
241
  __DEVICE__
242
- float floorf(float __x) { return __ocml_floor_f32(__x); }
242
+ float floorf(float __x) { return __builtin_floorf(__x); }
243
243
 
244
244
  __DEVICE__
245
245
  float fmaf(float __x, float __y, float __z) {
246
- return __ocml_fma_f32(__x, __y, __z);
246
+ return __builtin_fmaf(__x, __y, __z);
247
247
  }
248
248
 
249
249
  __DEVICE__
250
- float fmaxf(float __x, float __y) { return __ocml_fmax_f32(__x, __y); }
250
+ float fmaxf(float __x, float __y) { return __builtin_fmaxf(__x, __y); }
251
251
 
252
252
  __DEVICE__
253
- float fminf(float __x, float __y) { return __ocml_fmin_f32(__x, __y); }
253
+ float fminf(float __x, float __y) { return __builtin_fminf(__x, __y); }
254
254
 
255
255
  __DEVICE__
256
256
  float fmodf(float __x, float __y) { return __ocml_fmod_f32(__x, __y); }
257
257
 
258
258
  __DEVICE__
259
259
  float frexpf(float __x, int *__nptr) {
260
- int __tmp;
261
- #ifdef __OPENMP_AMDGCN__
262
- #pragma omp allocate(__tmp) allocator(omp_thread_mem_alloc)
263
- #endif
264
- float __r =
265
- __ocml_frexp_f32(__x, (__attribute__((address_space(5))) int *)&__tmp);
266
- *__nptr = __tmp;
267
-
268
- return __r;
260
+ return __builtin_frexpf(__x, __nptr);
269
261
  }
270
262
 
271
263
  __DEVICE__
@@ -275,13 +267,13 @@ __DEVICE__
275
267
  int ilogbf(float __x) { return __ocml_ilogb_f32(__x); }
276
268
 
277
269
  __DEVICE__
278
- __RETURN_TYPE __finitef(float __x) { return __ocml_isfinite_f32(__x); }
270
+ __RETURN_TYPE __finitef(float __x) { return __builtin_isfinite(__x); }
279
271
 
280
272
  __DEVICE__
281
- __RETURN_TYPE __isinff(float __x) { return __ocml_isinf_f32(__x); }
273
+ __RETURN_TYPE __isinff(float __x) { return __builtin_isinf(__x); }
282
274
 
283
275
  __DEVICE__
284
- __RETURN_TYPE __isnanf(float __x) { return __ocml_isnan_f32(__x); }
276
+ __RETURN_TYPE __isnanf(float __x) { return __builtin_isnan(__x); }
285
277
 
286
278
  __DEVICE__
287
279
  float j0f(float __x) { return __ocml_j0_f32(__x); }
@@ -311,37 +303,37 @@ float jnf(int __n, float __x) { // TODO: we could use Ahmes multiplication
311
303
  }
312
304
 
313
305
  __DEVICE__
314
- float ldexpf(float __x, int __e) { return __ocml_ldexp_f32(__x, __e); }
306
+ float ldexpf(float __x, int __e) { return __builtin_amdgcn_ldexpf(__x, __e); }
315
307
 
316
308
  __DEVICE__
317
309
  float lgammaf(float __x) { return __ocml_lgamma_f32(__x); }
318
310
 
319
311
  __DEVICE__
320
- long long int llrintf(float __x) { return __ocml_rint_f32(__x); }
312
+ long long int llrintf(float __x) { return __builtin_rintf(__x); }
321
313
 
322
314
  __DEVICE__
323
- long long int llroundf(float __x) { return __ocml_round_f32(__x); }
315
+ long long int llroundf(float __x) { return __builtin_roundf(__x); }
324
316
 
325
317
  __DEVICE__
326
- float log10f(float __x) { return __ocml_log10_f32(__x); }
318
+ float log10f(float __x) { return __builtin_log10f(__x); }
327
319
 
328
320
  __DEVICE__
329
321
  float log1pf(float __x) { return __ocml_log1p_f32(__x); }
330
322
 
331
323
  __DEVICE__
332
- float log2f(float __x) { return __ocml_log2_f32(__x); }
324
+ float log2f(float __x) { return __builtin_log2f(__x); }
333
325
 
334
326
  __DEVICE__
335
327
  float logbf(float __x) { return __ocml_logb_f32(__x); }
336
328
 
337
329
  __DEVICE__
338
- float logf(float __x) { return __ocml_log_f32(__x); }
330
+ float logf(float __x) { return __builtin_logf(__x); }
339
331
 
340
332
  __DEVICE__
341
- long int lrintf(float __x) { return __ocml_rint_f32(__x); }
333
+ long int lrintf(float __x) { return __builtin_rintf(__x); }
342
334
 
343
335
  __DEVICE__
344
- long int lroundf(float __x) { return __ocml_round_f32(__x); }
336
+ long int lroundf(float __x) { return __builtin_roundf(__x); }
345
337
 
346
338
  __DEVICE__
347
339
  float modff(float __x, float *__iptr) {
@@ -377,7 +369,7 @@ float nanf(const char *__tagp __attribute__((nonnull))) {
377
369
  }
378
370
 
379
371
  __DEVICE__
380
- float nearbyintf(float __x) { return __ocml_nearbyint_f32(__x); }
372
+ float nearbyintf(float __x) { return __builtin_nearbyintf(__x); }
381
373
 
382
374
  __DEVICE__
383
375
  float nextafterf(float __x, float __y) {
@@ -443,7 +435,7 @@ __DEVICE__
443
435
  float rhypotf(float __x, float __y) { return __ocml_rhypot_f32(__x, __y); }
444
436
 
445
437
  __DEVICE__
446
- float rintf(float __x) { return __ocml_rint_f32(__x); }
438
+ float rintf(float __x) { return __builtin_rintf(__x); }
447
439
 
448
440
  __DEVICE__
449
441
  float rnorm3df(float __x, float __y, float __z) {
@@ -468,22 +460,22 @@ float rnormf(int __dim,
468
460
  }
469
461
 
470
462
  __DEVICE__
471
- float roundf(float __x) { return __ocml_round_f32(__x); }
463
+ float roundf(float __x) { return __builtin_roundf(__x); }
472
464
 
473
465
  __DEVICE__
474
466
  float rsqrtf(float __x) { return __ocml_rsqrt_f32(__x); }
475
467
 
476
468
  __DEVICE__
477
469
  float scalblnf(float __x, long int __n) {
478
- return (__n < INT_MAX) ? __ocml_scalbn_f32(__x, __n)
470
+ return (__n < INT_MAX) ? __builtin_amdgcn_ldexpf(__x, __n)
479
471
  : __ocml_scalb_f32(__x, __n);
480
472
  }
481
473
 
482
474
  __DEVICE__
483
- float scalbnf(float __x, int __n) { return __ocml_scalbn_f32(__x, __n); }
475
+ float scalbnf(float __x, int __n) { return __builtin_amdgcn_ldexpf(__x, __n); }
484
476
 
485
477
  __DEVICE__
486
- __RETURN_TYPE __signbitf(float __x) { return __ocml_signbit_f32(__x); }
478
+ __RETURN_TYPE __signbitf(float __x) { return __builtin_signbitf(__x); }
487
479
 
488
480
  __DEVICE__
489
481
  void sincosf(float __x, float *__sinptr, float *__cosptr) {
@@ -529,7 +521,7 @@ __DEVICE__
529
521
  float tgammaf(float __x) { return __ocml_tgamma_f32(__x); }
530
522
 
531
523
  __DEVICE__
532
- float truncf(float __x) { return __ocml_trunc_f32(__x); }
524
+ float truncf(float __x) { return __builtin_truncf(__x); }
533
525
 
534
526
  __DEVICE__
535
527
  float y0f(float __x) { return __ocml_y0_f32(__x); }
@@ -621,7 +613,7 @@ float __fmaf_rz(float __x, float __y, float __z) {
621
613
  #else
622
614
  __DEVICE__
623
615
  float __fmaf_rn(float __x, float __y, float __z) {
624
- return __ocml_fma_f32(__x, __y, __z);
616
+ return __builtin_fmaf(__x, __y, __z);
625
617
  }
626
618
  #endif
627
619
 
@@ -654,7 +646,7 @@ float __frcp_rn(float __x) { return 1.0f / __x; }
654
646
  #endif
655
647
 
656
648
  __DEVICE__
657
- float __frsqrt_rn(float __x) { return __llvm_amdgcn_rsq_f32(__x); }
649
+ float __frsqrt_rn(float __x) { return __builtin_amdgcn_rsqf(__x); }
658
650
 
659
651
  #if defined OCML_BASIC_ROUNDED_OPERATIONS
660
652
  __DEVICE__
@@ -739,11 +731,11 @@ __DEVICE__
739
731
  double cbrt(double __x) { return __ocml_cbrt_f64(__x); }
740
732
 
741
733
  __DEVICE__
742
- double ceil(double __x) { return __ocml_ceil_f64(__x); }
734
+ double ceil(double __x) { return __builtin_ceil(__x); }
743
735
 
744
736
  __DEVICE__
745
737
  double copysign(double __x, double __y) {
746
- return __ocml_copysign_f64(__x, __y);
738
+ return __builtin_copysign(__x, __y);
747
739
  }
748
740
 
749
741
  __DEVICE__
@@ -795,32 +787,25 @@ __DEVICE__
795
787
  double fdim(double __x, double __y) { return __ocml_fdim_f64(__x, __y); }
796
788
 
797
789
  __DEVICE__
798
- double floor(double __x) { return __ocml_floor_f64(__x); }
790
+ double floor(double __x) { return __builtin_floor(__x); }
799
791
 
800
792
  __DEVICE__
801
793
  double fma(double __x, double __y, double __z) {
802
- return __ocml_fma_f64(__x, __y, __z);
794
+ return __builtin_fma(__x, __y, __z);
803
795
  }
804
796
 
805
797
  __DEVICE__
806
- double fmax(double __x, double __y) { return __ocml_fmax_f64(__x, __y); }
798
+ double fmax(double __x, double __y) { return __builtin_fmax(__x, __y); }
807
799
 
808
800
  __DEVICE__
809
- double fmin(double __x, double __y) { return __ocml_fmin_f64(__x, __y); }
801
+ double fmin(double __x, double __y) { return __builtin_fmin(__x, __y); }
810
802
 
811
803
  __DEVICE__
812
804
  double fmod(double __x, double __y) { return __ocml_fmod_f64(__x, __y); }
813
805
 
814
806
  __DEVICE__
815
807
  double frexp(double __x, int *__nptr) {
816
- int __tmp;
817
- #ifdef __OPENMP_AMDGCN__
818
- #pragma omp allocate(__tmp) allocator(omp_thread_mem_alloc)
819
- #endif
820
- double __r =
821
- __ocml_frexp_f64(__x, (__attribute__((address_space(5))) int *)&__tmp);
822
- *__nptr = __tmp;
823
- return __r;
808
+ return __builtin_frexp(__x, __nptr);
824
809
  }
825
810
 
826
811
  __DEVICE__
@@ -830,13 +815,13 @@ __DEVICE__
830
815
  int ilogb(double __x) { return __ocml_ilogb_f64(__x); }
831
816
 
832
817
  __DEVICE__
833
- __RETURN_TYPE __finite(double __x) { return __ocml_isfinite_f64(__x); }
818
+ __RETURN_TYPE __finite(double __x) { return __builtin_isfinite(__x); }
834
819
 
835
820
  __DEVICE__
836
- __RETURN_TYPE __isinf(double __x) { return __ocml_isinf_f64(__x); }
821
+ __RETURN_TYPE __isinf(double __x) { return __builtin_isinf(__x); }
837
822
 
838
823
  __DEVICE__
839
- __RETURN_TYPE __isnan(double __x) { return __ocml_isnan_f64(__x); }
824
+ __RETURN_TYPE __isnan(double __x) { return __builtin_isnan(__x); }
840
825
 
841
826
  __DEVICE__
842
827
  double j0(double __x) { return __ocml_j0_f64(__x); }
@@ -866,16 +851,16 @@ double jn(int __n, double __x) { // TODO: we could use Ahmes multiplication
866
851
  }
867
852
 
868
853
  __DEVICE__
869
- double ldexp(double __x, int __e) { return __ocml_ldexp_f64(__x, __e); }
854
+ double ldexp(double __x, int __e) { return __builtin_amdgcn_ldexp(__x, __e); }
870
855
 
871
856
  __DEVICE__
872
857
  double lgamma(double __x) { return __ocml_lgamma_f64(__x); }
873
858
 
874
859
  __DEVICE__
875
- long long int llrint(double __x) { return __ocml_rint_f64(__x); }
860
+ long long int llrint(double __x) { return __builtin_rint(__x); }
876
861
 
877
862
  __DEVICE__
878
- long long int llround(double __x) { return __ocml_round_f64(__x); }
863
+ long long int llround(double __x) { return __builtin_round(__x); }
879
864
 
880
865
  __DEVICE__
881
866
  double log(double __x) { return __ocml_log_f64(__x); }
@@ -893,10 +878,10 @@ __DEVICE__
893
878
  double logb(double __x) { return __ocml_logb_f64(__x); }
894
879
 
895
880
  __DEVICE__
896
- long int lrint(double __x) { return __ocml_rint_f64(__x); }
881
+ long int lrint(double __x) { return __builtin_rint(__x); }
897
882
 
898
883
  __DEVICE__
899
- long int lround(double __x) { return __ocml_round_f64(__x); }
884
+ long int lround(double __x) { return __builtin_round(__x); }
900
885
 
901
886
  __DEVICE__
902
887
  double modf(double __x, double *__iptr) {
@@ -940,7 +925,7 @@ double nan(const char *__tagp) {
940
925
  }
941
926
 
942
927
  __DEVICE__
943
- double nearbyint(double __x) { return __ocml_nearbyint_f64(__x); }
928
+ double nearbyint(double __x) { return __builtin_nearbyint(__x); }
944
929
 
945
930
  __DEVICE__
946
931
  double nextafter(double __x, double __y) {
@@ -1006,7 +991,7 @@ __DEVICE__
1006
991
  double rhypot(double __x, double __y) { return __ocml_rhypot_f64(__x, __y); }
1007
992
 
1008
993
  __DEVICE__
1009
- double rint(double __x) { return __ocml_rint_f64(__x); }
994
+ double rint(double __x) { return __builtin_rint(__x); }
1010
995
 
1011
996
  __DEVICE__
1012
997
  double rnorm(int __dim,
@@ -1031,21 +1016,21 @@ double rnorm4d(double __x, double __y, double __z, double __w) {
1031
1016
  }
1032
1017
 
1033
1018
  __DEVICE__
1034
- double round(double __x) { return __ocml_round_f64(__x); }
1019
+ double round(double __x) { return __builtin_round(__x); }
1035
1020
 
1036
1021
  __DEVICE__
1037
1022
  double rsqrt(double __x) { return __ocml_rsqrt_f64(__x); }
1038
1023
 
1039
1024
  __DEVICE__
1040
1025
  double scalbln(double __x, long int __n) {
1041
- return (__n < INT_MAX) ? __ocml_scalbn_f64(__x, __n)
1026
+ return (__n < INT_MAX) ? __builtin_amdgcn_ldexp(__x, __n)
1042
1027
  : __ocml_scalb_f64(__x, __n);
1043
1028
  }
1044
1029
  __DEVICE__
1045
- double scalbn(double __x, int __n) { return __ocml_scalbn_f64(__x, __n); }
1030
+ double scalbn(double __x, int __n) { return __builtin_amdgcn_ldexp(__x, __n); }
1046
1031
 
1047
1032
  __DEVICE__
1048
- __RETURN_TYPE __signbit(double __x) { return __ocml_signbit_f64(__x); }
1033
+ __RETURN_TYPE __signbit(double __x) { return __builtin_signbit(__x); }
1049
1034
 
1050
1035
  __DEVICE__
1051
1036
  double sin(double __x) { return __ocml_sin_f64(__x); }
@@ -1091,7 +1076,7 @@ __DEVICE__
1091
1076
  double tgamma(double __x) { return __ocml_tgamma_f64(__x); }
1092
1077
 
1093
1078
  __DEVICE__
1094
- double trunc(double __x) { return __ocml_trunc_f64(__x); }
1079
+ double trunc(double __x) { return __builtin_trunc(__x); }
1095
1080
 
1096
1081
  __DEVICE__
1097
1082
  double y0(double __x) { return __ocml_y0_f64(__x); }
@@ -1258,7 +1243,7 @@ double __fma_rz(double __x, double __y, double __z) {
1258
1243
  #else
1259
1244
  __DEVICE__
1260
1245
  double __fma_rn(double __x, double __y, double __z) {
1261
- return __ocml_fma_f64(__x, __y, __z);
1246
+ return __builtin_fma(__x, __y, __z);
1262
1247
  }
1263
1248
  #endif
1264
1249
  // END INTRINSICS
@@ -1290,16 +1275,16 @@ __DEVICE__ int max(int __arg1, int __arg2) {
1290
1275
  }
1291
1276
 
1292
1277
  __DEVICE__
1293
- float max(float __x, float __y) { return fmaxf(__x, __y); }
1278
+ float max(float __x, float __y) { return __builtin_fmaxf(__x, __y); }
1294
1279
 
1295
1280
  __DEVICE__
1296
- double max(double __x, double __y) { return fmax(__x, __y); }
1281
+ double max(double __x, double __y) { return __builtin_fmax(__x, __y); }
1297
1282
 
1298
1283
  __DEVICE__
1299
- float min(float __x, float __y) { return fminf(__x, __y); }
1284
+ float min(float __x, float __y) { return __builtin_fminf(__x, __y); }
1300
1285
 
1301
1286
  __DEVICE__
1302
- double min(double __x, double __y) { return fmin(__x, __y); }
1287
+ double min(double __x, double __y) { return __builtin_fmin(__x, __y); }
1303
1288
 
1304
1289
  #if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__)
1305
1290
  __host__ inline static int min(int __arg1, int __arg2) {
@@ -80,12 +80,25 @@ extern "C" {
80
80
  #if HIP_VERSION_MAJOR * 100 + HIP_VERSION_MINOR >= 405
81
81
  extern "C" __device__ unsigned long long __ockl_dm_alloc(unsigned long long __size);
82
82
  extern "C" __device__ void __ockl_dm_dealloc(unsigned long long __addr);
83
+ #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);
86
+ __attribute__((noinline, weak)) __device__ void *malloc(__hip_size_t __size) {
87
+ unsigned long long __pc = (unsigned long long)__builtin_return_address(0);
88
+ return (void *)__asan_malloc_impl(__size, __pc);
89
+ }
90
+ __attribute__((noinline, weak)) __device__ void free(void *__ptr) {
91
+ unsigned long long __pc = (unsigned long long)__builtin_return_address(0);
92
+ __asan_free_impl((unsigned long long)__ptr, __pc);
93
+ }
94
+ #else
83
95
  __attribute__((weak)) inline __device__ void *malloc(__hip_size_t __size) {
84
96
  return (void *) __ockl_dm_alloc(__size);
85
97
  }
86
98
  __attribute__((weak)) inline __device__ void free(void *__ptr) {
87
99
  __ockl_dm_dealloc((unsigned long long)__ptr);
88
100
  }
101
+ #endif // __has_feature(address_sanitizer)
89
102
  #else // HIP version check
90
103
  #if __HIP_ENABLE_DEVICE_MALLOC__
91
104
  __device__ void *__hip_malloc(__hip_size_t __size);
@@ -0,0 +1,227 @@
1
+ /*===---- adxintrin.h - ADX intrinsics -------------------------------------===
2
+ *
3
+ * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ * See https://llvm.org/LICENSE.txt for license information.
5
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ *
7
+ *===-----------------------------------------------------------------------===
8
+ */
9
+
10
+ #ifndef __IMMINTRIN_H
11
+ #error "Never use <adxintrin.h> directly; include <immintrin.h> instead."
12
+ #endif
13
+
14
+ #ifndef __ADXINTRIN_H
15
+ #define __ADXINTRIN_H
16
+
17
+ /* Define the default attributes for the functions in this file. */
18
+ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
19
+
20
+ /* Use C++ inline semantics in C++, GNU inline for C mode. */
21
+ #if defined(__cplusplus)
22
+ #define __INLINE __inline
23
+ #else
24
+ #define __INLINE static __inline
25
+ #endif
26
+
27
+ #if defined(__cplusplus)
28
+ extern "C" {
29
+ #endif
30
+
31
+ /* Intrinsics that are available only if __ADX__ is defined. */
32
+
33
+ /// Adds unsigned 32-bit integers \a __x and \a __y, plus 0 or 1 as indicated
34
+ /// by the carry flag \a __cf. Stores the unsigned 32-bit sum in the memory
35
+ /// at \a __p, and returns the 8-bit carry-out (carry flag).
36
+ ///
37
+ /// \code{.operation}
38
+ /// temp := (__cf == 0) ? 0 : 1
39
+ /// Store32(__p, __x + __y + temp)
40
+ /// result := CF
41
+ /// \endcode
42
+ ///
43
+ /// \headerfile <immintrin.h>
44
+ ///
45
+ /// This intrinsic corresponds to the \c ADCX instruction.
46
+ ///
47
+ /// \param __cf
48
+ /// The 8-bit unsigned carry flag; any non-zero value indicates carry.
49
+ /// \param __x
50
+ /// A 32-bit unsigned addend.
51
+ /// \param __y
52
+ /// A 32-bit unsigned addend.
53
+ /// \param __p
54
+ /// Pointer to memory for storing the sum.
55
+ /// \returns The 8-bit unsigned carry-out value.
56
+ __INLINE unsigned char
57
+ __attribute__((__always_inline__, __nodebug__, __target__("adx")))
58
+ _addcarryx_u32(unsigned char __cf, unsigned int __x, unsigned int __y,
59
+ unsigned int *__p) {
60
+ return __builtin_ia32_addcarryx_u32(__cf, __x, __y, __p);
61
+ }
62
+
63
+ #ifdef __x86_64__
64
+ /// Adds unsigned 64-bit integers \a __x and \a __y, plus 0 or 1 as indicated
65
+ /// by the carry flag \a __cf. Stores the unsigned 64-bit sum in the memory
66
+ /// at \a __p, and returns the 8-bit carry-out (carry flag).
67
+ ///
68
+ /// \code{.operation}
69
+ /// temp := (__cf == 0) ? 0 : 1
70
+ /// Store64(__p, __x + __y + temp)
71
+ /// result := CF
72
+ /// \endcode
73
+ ///
74
+ /// \headerfile <immintrin.h>
75
+ ///
76
+ /// This intrinsic corresponds to the \c ADCX instruction.
77
+ ///
78
+ /// \param __cf
79
+ /// The 8-bit unsigned carry flag; any non-zero value indicates carry.
80
+ /// \param __x
81
+ /// A 64-bit unsigned addend.
82
+ /// \param __y
83
+ /// A 64-bit unsigned addend.
84
+ /// \param __p
85
+ /// Pointer to memory for storing the sum.
86
+ /// \returns The 8-bit unsigned carry-out value.
87
+ __INLINE unsigned char
88
+ __attribute__((__always_inline__, __nodebug__, __target__("adx")))
89
+ _addcarryx_u64(unsigned char __cf, unsigned long long __x,
90
+ unsigned long long __y, unsigned long long *__p) {
91
+ return __builtin_ia32_addcarryx_u64(__cf, __x, __y, __p);
92
+ }
93
+ #endif
94
+
95
+ /* Intrinsics that are also available if __ADX__ is undefined. */
96
+
97
+ /// Adds unsigned 32-bit integers \a __x and \a __y, plus 0 or 1 as indicated
98
+ /// by the carry flag \a __cf. Stores the unsigned 32-bit sum in the memory
99
+ /// at \a __p, and returns the 8-bit carry-out (carry flag).
100
+ ///
101
+ /// \code{.operation}
102
+ /// temp := (__cf == 0) ? 0 : 1
103
+ /// Store32(__p, __x + __y + temp)
104
+ /// result := CF
105
+ /// \endcode
106
+ ///
107
+ /// \headerfile <immintrin.h>
108
+ ///
109
+ /// This intrinsic corresponds to the \c ADC instruction.
110
+ ///
111
+ /// \param __cf
112
+ /// The 8-bit unsigned carry flag; any non-zero value indicates carry.
113
+ /// \param __x
114
+ /// A 32-bit unsigned addend.
115
+ /// \param __y
116
+ /// A 32-bit unsigned addend.
117
+ /// \param __p
118
+ /// Pointer to memory for storing the sum.
119
+ /// \returns The 8-bit unsigned carry-out value.
120
+ __INLINE unsigned char __DEFAULT_FN_ATTRS _addcarry_u32(unsigned char __cf,
121
+ unsigned int __x,
122
+ unsigned int __y,
123
+ unsigned int *__p) {
124
+ return __builtin_ia32_addcarryx_u32(__cf, __x, __y, __p);
125
+ }
126
+
127
+ #ifdef __x86_64__
128
+ /// Adds unsigned 64-bit integers \a __x and \a __y, plus 0 or 1 as indicated
129
+ /// by the carry flag \a __cf. Stores the unsigned 64-bit sum in the memory
130
+ /// at \a __p, and returns the 8-bit carry-out (carry flag).
131
+ ///
132
+ /// \code{.operation}
133
+ /// temp := (__cf == 0) ? 0 : 1
134
+ /// Store64(__p, __x + __y + temp)
135
+ /// result := CF
136
+ /// \endcode
137
+ ///
138
+ /// \headerfile <immintrin.h>
139
+ ///
140
+ /// This intrinsic corresponds to the \c ADC instruction.
141
+ ///
142
+ /// \param __cf
143
+ /// The 8-bit unsigned carry flag; any non-zero value indicates carry.
144
+ /// \param __x
145
+ /// A 64-bit unsigned addend.
146
+ /// \param __y
147
+ /// A 64-bit unsigned addend.
148
+ /// \param __p
149
+ /// Pointer to memory for storing the sum.
150
+ /// \returns The 8-bit unsigned carry-out value.
151
+ __INLINE unsigned char __DEFAULT_FN_ATTRS
152
+ _addcarry_u64(unsigned char __cf, unsigned long long __x,
153
+ unsigned long long __y, unsigned long long *__p) {
154
+ return __builtin_ia32_addcarryx_u64(__cf, __x, __y, __p);
155
+ }
156
+ #endif
157
+
158
+ /// Adds unsigned 32-bit integer \a __y to 0 or 1 as indicated by the carry
159
+ /// flag \a __cf, and subtracts the result from unsigned 32-bit integer
160
+ /// \a __x. Stores the unsigned 32-bit difference in the memory at \a __p,
161
+ /// and returns the 8-bit carry-out (carry or overflow flag).
162
+ ///
163
+ /// \code{.operation}
164
+ /// temp := (__cf == 0) ? 0 : 1
165
+ /// Store32(__p, __x - (__y + temp))
166
+ /// result := CF
167
+ /// \endcode
168
+ ///
169
+ /// \headerfile <immintrin.h>
170
+ ///
171
+ /// This intrinsic corresponds to the \c SBB instruction.
172
+ ///
173
+ /// \param __cf
174
+ /// The 8-bit unsigned carry flag; any non-zero value indicates carry.
175
+ /// \param __x
176
+ /// The 32-bit unsigned minuend.
177
+ /// \param __y
178
+ /// The 32-bit unsigned subtrahend.
179
+ /// \param __p
180
+ /// Pointer to memory for storing the difference.
181
+ /// \returns The 8-bit unsigned carry-out value.
182
+ __INLINE unsigned char __DEFAULT_FN_ATTRS _subborrow_u32(unsigned char __cf,
183
+ unsigned int __x,
184
+ unsigned int __y,
185
+ unsigned int *__p) {
186
+ return __builtin_ia32_subborrow_u32(__cf, __x, __y, __p);
187
+ }
188
+
189
+ #ifdef __x86_64__
190
+ /// Adds unsigned 64-bit integer \a __y to 0 or 1 as indicated by the carry
191
+ /// flag \a __cf, and subtracts the result from unsigned 64-bit integer
192
+ /// \a __x. Stores the unsigned 64-bit difference in the memory at \a __p,
193
+ /// and returns the 8-bit carry-out (carry or overflow flag).
194
+ ///
195
+ /// \code{.operation}
196
+ /// temp := (__cf == 0) ? 0 : 1
197
+ /// Store64(__p, __x - (__y + temp))
198
+ /// result := CF
199
+ /// \endcode
200
+ ///
201
+ /// \headerfile <immintrin.h>
202
+ ///
203
+ /// This intrinsic corresponds to the \c ADC instruction.
204
+ ///
205
+ /// \param __cf
206
+ /// The 8-bit unsigned carry flag; any non-zero value indicates carry.
207
+ /// \param __x
208
+ /// The 64-bit unsigned minuend.
209
+ /// \param __y
210
+ /// The 64-bit unsigned subtrahend.
211
+ /// \param __p
212
+ /// Pointer to memory for storing the difference.
213
+ /// \returns The 8-bit unsigned carry-out value.
214
+ __INLINE unsigned char __DEFAULT_FN_ATTRS
215
+ _subborrow_u64(unsigned char __cf, unsigned long long __x,
216
+ unsigned long long __y, unsigned long long *__p) {
217
+ return __builtin_ia32_subborrow_u64(__cf, __x, __y, __p);
218
+ }
219
+ #endif
220
+
221
+ #if defined(__cplusplus)
222
+ }
223
+ #endif
224
+
225
+ #undef __DEFAULT_FN_ATTRS
226
+
227
+ #endif /* __ADXINTRIN_H */