@nativescript/linux 0.0.0-stage → 0.1.0-alpha.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 (238) hide show
  1. package/framework/App_Resources/Linux/app.desktop +8 -0
  2. package/framework/App_Resources/Linux/app.metainfo.xml +15 -0
  3. package/framework/App_Resources/Linux/icon.png +0 -0
  4. package/framework/App_Resources/Linux/images/.gitkeep +0 -0
  5. package/framework/__PROJECT_NAME__/app/.gitkeep +0 -0
  6. package/framework/runtime/x64/metadata-x86_64.bin +0 -0
  7. package/framework/runtime/x64/ns-linux +4 -0
  8. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_builtin_vars.h +121 -0
  9. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_cmath.h +512 -0
  10. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_complex_builtins.h +285 -0
  11. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_device_functions.h +1558 -0
  12. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_intrinsics.h +709 -0
  13. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_libdevice_declares.h +468 -0
  14. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_math.h +348 -0
  15. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_math_forward_declares.h +284 -0
  16. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_runtime_wrapper.h +503 -0
  17. package/framework/tools/x64/lib/clang/17/include/__clang_cuda_texture_intrinsics.h +742 -0
  18. package/framework/tools/x64/lib/clang/17/include/__clang_hip_cmath.h +842 -0
  19. package/framework/tools/x64/lib/clang/17/include/__clang_hip_libdevice_declares.h +353 -0
  20. package/framework/tools/x64/lib/clang/17/include/__clang_hip_math.h +1303 -0
  21. package/framework/tools/x64/lib/clang/17/include/__clang_hip_runtime_wrapper.h +151 -0
  22. package/framework/tools/x64/lib/clang/17/include/__clang_hip_stdlib.h +43 -0
  23. package/framework/tools/x64/lib/clang/17/include/__stddef_max_align_t.h +27 -0
  24. package/framework/tools/x64/lib/clang/17/include/__wmmintrin_aes.h +140 -0
  25. package/framework/tools/x64/lib/clang/17/include/__wmmintrin_pclmul.h +48 -0
  26. package/framework/tools/x64/lib/clang/17/include/adxintrin.h +227 -0
  27. package/framework/tools/x64/lib/clang/17/include/altivec.h +19342 -0
  28. package/framework/tools/x64/lib/clang/17/include/ammintrin.h +183 -0
  29. package/framework/tools/x64/lib/clang/17/include/amxcomplexintrin.h +169 -0
  30. package/framework/tools/x64/lib/clang/17/include/amxfp16intrin.h +58 -0
  31. package/framework/tools/x64/lib/clang/17/include/amxintrin.h +524 -0
  32. package/framework/tools/x64/lib/clang/17/include/arm64intr.h +35 -0
  33. package/framework/tools/x64/lib/clang/17/include/arm_acle.h +782 -0
  34. package/framework/tools/x64/lib/clang/17/include/arm_bf16.h +20 -0
  35. package/framework/tools/x64/lib/clang/17/include/arm_cde.h +410 -0
  36. package/framework/tools/x64/lib/clang/17/include/arm_cmse.h +217 -0
  37. package/framework/tools/x64/lib/clang/17/include/arm_fp16.h +596 -0
  38. package/framework/tools/x64/lib/clang/17/include/arm_mve.h +19187 -0
  39. package/framework/tools/x64/lib/clang/17/include/arm_neon.h +69885 -0
  40. package/framework/tools/x64/lib/clang/17/include/arm_neon_sve_bridge.h +182 -0
  41. package/framework/tools/x64/lib/clang/17/include/arm_sme_draft_spec_subject_to_change.h +642 -0
  42. package/framework/tools/x64/lib/clang/17/include/arm_sve.h +23950 -0
  43. package/framework/tools/x64/lib/clang/17/include/armintr.h +31 -0
  44. package/framework/tools/x64/lib/clang/17/include/avx2intrin.h +5263 -0
  45. package/framework/tools/x64/lib/clang/17/include/avx512bf16intrin.h +282 -0
  46. package/framework/tools/x64/lib/clang/17/include/avx512bitalgintrin.h +83 -0
  47. package/framework/tools/x64/lib/clang/17/include/avx512bwintrin.h +2024 -0
  48. package/framework/tools/x64/lib/clang/17/include/avx512cdintrin.h +123 -0
  49. package/framework/tools/x64/lib/clang/17/include/avx512dqintrin.h +1377 -0
  50. package/framework/tools/x64/lib/clang/17/include/avx512erintrin.h +271 -0
  51. package/framework/tools/x64/lib/clang/17/include/avx512fintrin.h +9775 -0
  52. package/framework/tools/x64/lib/clang/17/include/avx512fp16intrin.h +3350 -0
  53. package/framework/tools/x64/lib/clang/17/include/avx512ifmaintrin.h +68 -0
  54. package/framework/tools/x64/lib/clang/17/include/avx512ifmavlintrin.h +105 -0
  55. package/framework/tools/x64/lib/clang/17/include/avx512pfintrin.h +97 -0
  56. package/framework/tools/x64/lib/clang/17/include/avx512vbmi2intrin.h +357 -0
  57. package/framework/tools/x64/lib/clang/17/include/avx512vbmiintrin.h +105 -0
  58. package/framework/tools/x64/lib/clang/17/include/avx512vbmivlintrin.h +188 -0
  59. package/framework/tools/x64/lib/clang/17/include/avx512vlbf16intrin.h +515 -0
  60. package/framework/tools/x64/lib/clang/17/include/avx512vlbitalgintrin.h +145 -0
  61. package/framework/tools/x64/lib/clang/17/include/avx512vlbwintrin.h +3161 -0
  62. package/framework/tools/x64/lib/clang/17/include/avx512vlcdintrin.h +225 -0
  63. package/framework/tools/x64/lib/clang/17/include/avx512vldqintrin.h +1167 -0
  64. package/framework/tools/x64/lib/clang/17/include/avx512vlfp16intrin.h +2071 -0
  65. package/framework/tools/x64/lib/clang/17/include/avx512vlintrin.h +8431 -0
  66. package/framework/tools/x64/lib/clang/17/include/avx512vlvbmi2intrin.h +689 -0
  67. package/framework/tools/x64/lib/clang/17/include/avx512vlvnniintrin.h +304 -0
  68. package/framework/tools/x64/lib/clang/17/include/avx512vlvp2intersectintrin.h +121 -0
  69. package/framework/tools/x64/lib/clang/17/include/avx512vnniintrin.h +115 -0
  70. package/framework/tools/x64/lib/clang/17/include/avx512vp2intersectintrin.h +77 -0
  71. package/framework/tools/x64/lib/clang/17/include/avx512vpopcntdqintrin.h +54 -0
  72. package/framework/tools/x64/lib/clang/17/include/avx512vpopcntdqvlintrin.h +91 -0
  73. package/framework/tools/x64/lib/clang/17/include/avxifmaintrin.h +177 -0
  74. package/framework/tools/x64/lib/clang/17/include/avxintrin.h +5108 -0
  75. package/framework/tools/x64/lib/clang/17/include/avxneconvertintrin.h +484 -0
  76. package/framework/tools/x64/lib/clang/17/include/avxvnniint16intrin.h +473 -0
  77. package/framework/tools/x64/lib/clang/17/include/avxvnniint8intrin.h +471 -0
  78. package/framework/tools/x64/lib/clang/17/include/avxvnniintrin.h +225 -0
  79. package/framework/tools/x64/lib/clang/17/include/bmi2intrin.h +255 -0
  80. package/framework/tools/x64/lib/clang/17/include/bmiintrin.h +431 -0
  81. package/framework/tools/x64/lib/clang/17/include/builtins.h +16 -0
  82. package/framework/tools/x64/lib/clang/17/include/cet.h +66 -0
  83. package/framework/tools/x64/lib/clang/17/include/cetintrin.h +115 -0
  84. package/framework/tools/x64/lib/clang/17/include/cldemoteintrin.h +36 -0
  85. package/framework/tools/x64/lib/clang/17/include/clflushoptintrin.h +36 -0
  86. package/framework/tools/x64/lib/clang/17/include/clwbintrin.h +38 -0
  87. package/framework/tools/x64/lib/clang/17/include/clzerointrin.h +38 -0
  88. package/framework/tools/x64/lib/clang/17/include/cmpccxaddintrin.h +70 -0
  89. package/framework/tools/x64/lib/clang/17/include/cpuid.h +331 -0
  90. package/framework/tools/x64/lib/clang/17/include/crc32intrin.h +100 -0
  91. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/algorithm +116 -0
  92. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/bits/basic_string.h +9 -0
  93. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/bits/basic_string.tcc +9 -0
  94. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
  95. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/cmath +90 -0
  96. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/complex +90 -0
  97. package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/new +106 -0
  98. package/framework/tools/x64/lib/clang/17/include/emmintrin.h +4775 -0
  99. package/framework/tools/x64/lib/clang/17/include/enqcmdintrin.h +63 -0
  100. package/framework/tools/x64/lib/clang/17/include/f16cintrin.h +162 -0
  101. package/framework/tools/x64/lib/clang/17/include/float.h +168 -0
  102. package/framework/tools/x64/lib/clang/17/include/fma4intrin.h +218 -0
  103. package/framework/tools/x64/lib/clang/17/include/fmaintrin.h +780 -0
  104. package/framework/tools/x64/lib/clang/17/include/fxsrintrin.h +91 -0
  105. package/framework/tools/x64/lib/clang/17/include/gfniintrin.h +194 -0
  106. package/framework/tools/x64/lib/clang/17/include/hexagon_circ_brev_intrinsics.h +298 -0
  107. package/framework/tools/x64/lib/clang/17/include/hexagon_protos.h +8439 -0
  108. package/framework/tools/x64/lib/clang/17/include/hexagon_types.h +2621 -0
  109. package/framework/tools/x64/lib/clang/17/include/hresetintrin.h +49 -0
  110. package/framework/tools/x64/lib/clang/17/include/htmintrin.h +212 -0
  111. package/framework/tools/x64/lib/clang/17/include/htmxlintrin.h +345 -0
  112. package/framework/tools/x64/lib/clang/17/include/hvx_hexagon_protos.h +5183 -0
  113. package/framework/tools/x64/lib/clang/17/include/ia32intrin.h +441 -0
  114. package/framework/tools/x64/lib/clang/17/include/immintrin.h +758 -0
  115. package/framework/tools/x64/lib/clang/17/include/intrin.h +620 -0
  116. package/framework/tools/x64/lib/clang/17/include/inttypes.h +97 -0
  117. package/framework/tools/x64/lib/clang/17/include/invpcidintrin.h +23 -0
  118. package/framework/tools/x64/lib/clang/17/include/iso646.h +27 -0
  119. package/framework/tools/x64/lib/clang/17/include/keylockerintrin.h +530 -0
  120. package/framework/tools/x64/lib/clang/17/include/larchintrin.h +234 -0
  121. package/framework/tools/x64/lib/clang/17/include/limits.h +127 -0
  122. package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/ctype.h +85 -0
  123. package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/inttypes.h +34 -0
  124. package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/stdio.h +34 -0
  125. package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/stdlib.h +42 -0
  126. package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/string.h +37 -0
  127. package/framework/tools/x64/lib/clang/17/include/lwpintrin.h +136 -0
  128. package/framework/tools/x64/lib/clang/17/include/lzcntintrin.h +104 -0
  129. package/framework/tools/x64/lib/clang/17/include/mm3dnow.h +157 -0
  130. package/framework/tools/x64/lib/clang/17/include/mm_malloc.h +67 -0
  131. package/framework/tools/x64/lib/clang/17/include/mmintrin.h +1562 -0
  132. package/framework/tools/x64/lib/clang/17/include/module.modulemap +164 -0
  133. package/framework/tools/x64/lib/clang/17/include/movdirintrin.h +49 -0
  134. package/framework/tools/x64/lib/clang/17/include/msa.h +573 -0
  135. package/framework/tools/x64/lib/clang/17/include/mwaitxintrin.h +62 -0
  136. package/framework/tools/x64/lib/clang/17/include/nmmintrin.h +20 -0
  137. package/framework/tools/x64/lib/clang/17/include/opencl-c-base.h +820 -0
  138. package/framework/tools/x64/lib/clang/17/include/opencl-c.h +18356 -0
  139. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/__clang_openmp_device_functions.h +105 -0
  140. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/cmath +132 -0
  141. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/complex +55 -0
  142. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/complex.h +35 -0
  143. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/complex_cmath.h +388 -0
  144. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/math.h +61 -0
  145. package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/new +48 -0
  146. package/framework/tools/x64/lib/clang/17/include/pconfigintrin.h +40 -0
  147. package/framework/tools/x64/lib/clang/17/include/pkuintrin.h +34 -0
  148. package/framework/tools/x64/lib/clang/17/include/pmmintrin.h +300 -0
  149. package/framework/tools/x64/lib/clang/17/include/popcntintrin.h +59 -0
  150. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/bmi2intrin.h +134 -0
  151. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/bmiintrin.h +165 -0
  152. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/emmintrin.h +2269 -0
  153. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/immintrin.h +27 -0
  154. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/mm_malloc.h +45 -0
  155. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/mmintrin.h +1453 -0
  156. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/pmmintrin.h +145 -0
  157. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/smmintrin.h +663 -0
  158. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/tmmintrin.h +453 -0
  159. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/x86gprintrin.h +17 -0
  160. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/x86intrin.h +28 -0
  161. package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/xmmintrin.h +1827 -0
  162. package/framework/tools/x64/lib/clang/17/include/prfchiintrin.h +61 -0
  163. package/framework/tools/x64/lib/clang/17/include/prfchwintrin.h +58 -0
  164. package/framework/tools/x64/lib/clang/17/include/ptwriteintrin.h +37 -0
  165. package/framework/tools/x64/lib/clang/17/include/raointintrin.h +203 -0
  166. package/framework/tools/x64/lib/clang/17/include/rdpruintrin.h +57 -0
  167. package/framework/tools/x64/lib/clang/17/include/rdseedintrin.h +105 -0
  168. package/framework/tools/x64/lib/clang/17/include/riscv_ntlh.h +28 -0
  169. package/framework/tools/x64/lib/clang/17/include/rtmintrin.h +45 -0
  170. package/framework/tools/x64/lib/clang/17/include/s390intrin.h +25 -0
  171. package/framework/tools/x64/lib/clang/17/include/serializeintrin.h +30 -0
  172. package/framework/tools/x64/lib/clang/17/include/sgxintrin.h +60 -0
  173. package/framework/tools/x64/lib/clang/17/include/sha512intrin.h +200 -0
  174. package/framework/tools/x64/lib/clang/17/include/shaintrin.h +189 -0
  175. package/framework/tools/x64/lib/clang/17/include/sifive_vector.h +16 -0
  176. package/framework/tools/x64/lib/clang/17/include/sm3intrin.h +238 -0
  177. package/framework/tools/x64/lib/clang/17/include/sm4intrin.h +269 -0
  178. package/framework/tools/x64/lib/clang/17/include/smmintrin.h +2328 -0
  179. package/framework/tools/x64/lib/clang/17/include/stdalign.h +26 -0
  180. package/framework/tools/x64/lib/clang/17/include/stdarg.h +51 -0
  181. package/framework/tools/x64/lib/clang/17/include/stdatomic.h +196 -0
  182. package/framework/tools/x64/lib/clang/17/include/stdbool.h +34 -0
  183. package/framework/tools/x64/lib/clang/17/include/stddef.h +133 -0
  184. package/framework/tools/x64/lib/clang/17/include/stdint.h +979 -0
  185. package/framework/tools/x64/lib/clang/17/include/stdnoreturn.h +29 -0
  186. package/framework/tools/x64/lib/clang/17/include/tbmintrin.h +140 -0
  187. package/framework/tools/x64/lib/clang/17/include/tgmath.h +1368 -0
  188. package/framework/tools/x64/lib/clang/17/include/tmmintrin.h +775 -0
  189. package/framework/tools/x64/lib/clang/17/include/tsxldtrkintrin.h +56 -0
  190. package/framework/tools/x64/lib/clang/17/include/uintrintrin.h +157 -0
  191. package/framework/tools/x64/lib/clang/17/include/unwind.h +332 -0
  192. package/framework/tools/x64/lib/clang/17/include/vadefs.h +51 -0
  193. package/framework/tools/x64/lib/clang/17/include/vaesintrin.h +85 -0
  194. package/framework/tools/x64/lib/clang/17/include/varargs.h +12 -0
  195. package/framework/tools/x64/lib/clang/17/include/vecintrin.h +11127 -0
  196. package/framework/tools/x64/lib/clang/17/include/velintrin.h +71 -0
  197. package/framework/tools/x64/lib/clang/17/include/velintrin_approx.h +120 -0
  198. package/framework/tools/x64/lib/clang/17/include/velintrin_gen.h +1257 -0
  199. package/framework/tools/x64/lib/clang/17/include/vpclmulqdqintrin.h +30 -0
  200. package/framework/tools/x64/lib/clang/17/include/waitpkgintrin.h +42 -0
  201. package/framework/tools/x64/lib/clang/17/include/wasm_simd128.h +1997 -0
  202. package/framework/tools/x64/lib/clang/17/include/wbnoinvdintrin.h +24 -0
  203. package/framework/tools/x64/lib/clang/17/include/wmmintrin.h +23 -0
  204. package/framework/tools/x64/lib/clang/17/include/x86gprintrin.h +65 -0
  205. package/framework/tools/x64/lib/clang/17/include/x86intrin.h +67 -0
  206. package/framework/tools/x64/lib/clang/17/include/xmmintrin.h +3017 -0
  207. package/framework/tools/x64/lib/clang/17/include/xopintrin.h +770 -0
  208. package/framework/tools/x64/lib/clang/17/include/xsavecintrin.h +84 -0
  209. package/framework/tools/x64/lib/clang/17/include/xsaveintrin.h +63 -0
  210. package/framework/tools/x64/lib/clang/17/include/xsaveoptintrin.h +34 -0
  211. package/framework/tools/x64/lib/clang/17/include/xsavesintrin.h +44 -0
  212. package/framework/tools/x64/lib/clang/17/include/xtestintrin.h +27 -0
  213. package/framework/tools/x64/metadata-generator +4 -0
  214. package/framework/tools/x64/ns-bundle +0 -0
  215. package/framework/tools/x64/ns-metadata-filter +0 -0
  216. package/framework/typings/c!EGL.d.ts +431 -0
  217. package/framework/typings/c!GLES.d.ts +5002 -0
  218. package/framework/typings/c!GLib.d.ts +14488 -0
  219. package/framework/typings/c!Gtk.d.ts +17630 -0
  220. package/framework/typings/c!X11.d.ts +7054 -0
  221. package/framework/typings/c!_Builtin_intrinsics.d.ts +106 -0
  222. package/framework/typings/c!_Builtin_stddef_max_align_t.d.ts +6 -0
  223. package/framework/typings/c!cairo.d.ts +1248 -0
  224. package/framework/typings/c!fontconfig.d.ts +819 -0
  225. package/framework/typings/c!freetype.d.ts +1068 -0
  226. package/framework/typings/c!gdk_pixbuf.d.ts +326 -0
  227. package/framework/typings/c!graphene.d.ts +320 -0
  228. package/framework/typings/c!harfbuzz.d.ts +1292 -0
  229. package/framework/typings/c!icu.d.ts +3330 -0
  230. package/framework/typings/c!libc.d.ts +11639 -0
  231. package/framework/typings/c!libxml2.d.ts +7029 -0
  232. package/framework/typings/c!pango.d.ts +2225 -0
  233. package/framework/typings/c!uuid.d.ts +68 -0
  234. package/framework/typings/c!zlib.d.ts +276 -0
  235. package/framework/typings/index.d.ts +10 -0
  236. package/framework/typings/linux-runtime.d.ts +90 -0
  237. package/package.json +9 -4
  238. package/README.md +0 -3
@@ -0,0 +1,116 @@
1
+ /*===---- algorithm - CUDA wrapper for <algorithm> -------------------------===
2
+ *
3
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ * of this software and associated documentation files (the "Software"), to deal
5
+ * in the Software without restriction, including without limitation the rights
6
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ * copies of the Software, and to permit persons to whom the Software is
8
+ * furnished to do so, subject to the following conditions:
9
+ *
10
+ * The above copyright notice and this permission notice shall be included in
11
+ * all copies or substantial portions of the Software.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ * THE SOFTWARE.
20
+ *
21
+ *===-----------------------------------------------------------------------===
22
+ */
23
+
24
+ #ifndef __CLANG_CUDA_WRAPPERS_ALGORITHM
25
+ #define __CLANG_CUDA_WRAPPERS_ALGORITHM
26
+
27
+ // This header defines __device__ overloads of std::min/max.
28
+ //
29
+ // Ideally we'd declare these functions only if we're <= C++11. In C++14,
30
+ // these functions are constexpr, and so are implicitly __host__ __device__.
31
+ //
32
+ // However, the compiler being in C++14 mode does not imply that the standard
33
+ // library supports C++14. There is no macro we can test to check that the
34
+ // stdlib has constexpr std::min/max. Thus we have to unconditionally define
35
+ // our device overloads.
36
+ //
37
+ // A host+device function cannot be overloaded, and a constexpr function
38
+ // implicitly become host device if there's no explicitly host or device
39
+ // overload preceding it. So the simple thing to do would be to declare our
40
+ // device min/max overloads, and then #include_next <algorithm>. This way our
41
+ // device overloads would come first, and so if we have a C++14 stdlib, its
42
+ // min/max won't become host+device and conflict with our device overloads.
43
+ //
44
+ // But that also doesn't work. libstdc++ is evil and declares std::min/max in
45
+ // an internal header that is included *before* <algorithm>. Thus by the time
46
+ // we're inside of this file, std::min/max may already have been declared, and
47
+ // thus we can't prevent them from becoming host+device if they're constexpr.
48
+ //
49
+ // Therefore we perpetrate the following hack: We mark our __device__ overloads
50
+ // with __attribute__((enable_if(true, ""))). This causes the signature of the
51
+ // function to change without changing anything else about it. (Except that
52
+ // overload resolution will prefer it over the __host__ __device__ version
53
+ // rather than considering them equally good).
54
+
55
+ #include_next <algorithm>
56
+
57
+ // We need to define these overloads in exactly the namespace our standard
58
+ // library uses (including the right inline namespace), otherwise they won't be
59
+ // picked up by other functions in the standard library (e.g. functions in
60
+ // <complex>). Thus the ugliness below.
61
+ #ifdef _LIBCPP_BEGIN_NAMESPACE_STD
62
+ _LIBCPP_BEGIN_NAMESPACE_STD
63
+ #else
64
+ namespace std {
65
+ #ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
66
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
67
+ #endif
68
+ #endif
69
+
70
+ #pragma push_macro("_CPP14_CONSTEXPR")
71
+ #if __cplusplus >= 201402L
72
+ #define _CPP14_CONSTEXPR constexpr
73
+ #else
74
+ #define _CPP14_CONSTEXPR
75
+ #endif
76
+
77
+ template <class __T, class __Cmp>
78
+ __attribute__((enable_if(true, "")))
79
+ inline _CPP14_CONSTEXPR __host__ __device__ const __T &
80
+ max(const __T &__a, const __T &__b, __Cmp __cmp) {
81
+ return __cmp(__a, __b) ? __b : __a;
82
+ }
83
+
84
+ template <class __T>
85
+ __attribute__((enable_if(true, "")))
86
+ inline _CPP14_CONSTEXPR __host__ __device__ const __T &
87
+ max(const __T &__a, const __T &__b) {
88
+ return __a < __b ? __b : __a;
89
+ }
90
+
91
+ template <class __T, class __Cmp>
92
+ __attribute__((enable_if(true, "")))
93
+ inline _CPP14_CONSTEXPR __host__ __device__ const __T &
94
+ min(const __T &__a, const __T &__b, __Cmp __cmp) {
95
+ return __cmp(__b, __a) ? __b : __a;
96
+ }
97
+
98
+ template <class __T>
99
+ __attribute__((enable_if(true, "")))
100
+ inline _CPP14_CONSTEXPR __host__ __device__ const __T &
101
+ min(const __T &__a, const __T &__b) {
102
+ return __a < __b ? __a : __b;
103
+ }
104
+
105
+ #pragma pop_macro("_CPP14_CONSTEXPR")
106
+
107
+ #ifdef _LIBCPP_END_NAMESPACE_STD
108
+ _LIBCPP_END_NAMESPACE_STD
109
+ #else
110
+ #ifdef _GLIBCXX_BEGIN_NAMESPACE_VERSION
111
+ _GLIBCXX_END_NAMESPACE_VERSION
112
+ #endif
113
+ } // namespace std
114
+ #endif
115
+
116
+ #endif // __CLANG_CUDA_WRAPPERS_ALGORITHM
@@ -0,0 +1,9 @@
1
+ // CUDA headers define __noinline__ which interferes with libstdc++'s use of
2
+ // `__attribute((__noinline__))`. In order to avoid compilation error,
3
+ // temporarily unset __noinline__ when we include affected libstdc++ header.
4
+
5
+ #pragma push_macro("__noinline__")
6
+ #undef __noinline__
7
+ #include_next "bits/basic_string.h"
8
+
9
+ #pragma pop_macro("__noinline__")
@@ -0,0 +1,9 @@
1
+ // CUDA headers define __noinline__ which interferes with libstdc++'s use of
2
+ // `__attribute((__noinline__))`. In order to avoid compilation error,
3
+ // temporarily unset __noinline__ when we include affected libstdc++ header.
4
+
5
+ #pragma push_macro("__noinline__")
6
+ #undef __noinline__
7
+ #include_next "bits/basic_string.tcc"
8
+
9
+ #pragma pop_macro("__noinline__")
@@ -0,0 +1,9 @@
1
+ // CUDA headers define __noinline__ which interferes with libstdc++'s use of
2
+ // `__attribute((__noinline__))`. In order to avoid compilation error,
3
+ // temporarily unset __noinline__ when we include affected libstdc++ header.
4
+
5
+ #pragma push_macro("__noinline__")
6
+ #undef __noinline__
7
+ #include_next "bits/shared_ptr_base.h"
8
+
9
+ #pragma pop_macro("__noinline__")
@@ -0,0 +1,90 @@
1
+ /*===---- cmath - CUDA wrapper for <cmath> ---------------------------------===
2
+ *
3
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ * of this software and associated documentation files (the "Software"), to deal
5
+ * in the Software without restriction, including without limitation the rights
6
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ * copies of the Software, and to permit persons to whom the Software is
8
+ * furnished to do so, subject to the following conditions:
9
+ *
10
+ * The above copyright notice and this permission notice shall be included in
11
+ * all copies or substantial portions of the Software.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ * THE SOFTWARE.
20
+ *
21
+ *===-----------------------------------------------------------------------===
22
+ */
23
+
24
+ #ifndef __CLANG_CUDA_WRAPPERS_CMATH
25
+ #define __CLANG_CUDA_WRAPPERS_CMATH
26
+
27
+ #include_next <cmath>
28
+
29
+ #if defined(_LIBCPP_STD_VER)
30
+
31
+ // libc++ will need long double variants of these functions, but CUDA does not
32
+ // provide them. We'll provide their declarations, which should allow the
33
+ // headers to parse, but would not allow accidental use of them on a GPU.
34
+
35
+ __attribute__((device)) long double logb(long double);
36
+ __attribute__((device)) long double scalbn(long double, int);
37
+
38
+ namespace std {
39
+
40
+ // For __constexpr_fmin/fmax we only need device-side overloads before c++14
41
+ // where they are not constexpr.
42
+ #if _LIBCPP_STD_VER < 14
43
+
44
+ __attribute__((device))
45
+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 float __constexpr_fmax(float __x, float __y) _NOEXCEPT {
46
+ return __builtin_fmaxf(__x, __y);
47
+ }
48
+
49
+ __attribute__((device))
50
+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 double __constexpr_fmax(double __x, double __y) _NOEXCEPT {
51
+ return __builtin_fmax(__x, __y);
52
+ }
53
+
54
+ __attribute__((device))
55
+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 long double
56
+ __constexpr_fmax(long double __x, long double __y) _NOEXCEPT {
57
+ return __builtin_fmaxl(__x, __y);
58
+ }
59
+
60
+ template <class _Tp, class _Up, __enable_if_t<is_arithmetic<_Tp>::value && is_arithmetic<_Up>::value, int> = 0>
61
+ __attribute__((device))
62
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename __promote<_Tp, _Up>::type
63
+ __constexpr_fmax(_Tp __x, _Up __y) _NOEXCEPT {
64
+ using __result_type = typename __promote<_Tp, _Up>::type;
65
+ return std::__constexpr_fmax(static_cast<__result_type>(__x), static_cast<__result_type>(__y));
66
+ }
67
+ #endif // _LIBCPP_STD_VER < 14
68
+
69
+ // For logb/scalbn templates we must always provide device overloads because
70
+ // libc++ implementation uses __builtin_XXX which gets translated into a libcall
71
+ // which we can't handle on GPU. We need to forward those to CUDA-provided
72
+ // implementations.
73
+
74
+ template <class _Tp>
75
+ __attribute__((device))
76
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp __constexpr_logb(_Tp __x) {
77
+ return ::logb(__x);
78
+ }
79
+
80
+ template <class _Tp>
81
+ __attribute__((device))
82
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp __constexpr_scalbn(_Tp __x, int __exp) {
83
+ return ::scalbn(__x, __exp);
84
+ }
85
+
86
+ } // namespace std//
87
+
88
+ #endif // _LIBCPP_STD_VER
89
+
90
+ #endif // include guard
@@ -0,0 +1,90 @@
1
+ /*===---- complex - CUDA wrapper for <complex> ------------------------------===
2
+ *
3
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ * of this software and associated documentation files (the "Software"), to deal
5
+ * in the Software without restriction, including without limitation the rights
6
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ * copies of the Software, and to permit persons to whom the Software is
8
+ * furnished to do so, subject to the following conditions:
9
+ *
10
+ * The above copyright notice and this permission notice shall be included in
11
+ * all copies or substantial portions of the Software.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ * THE SOFTWARE.
20
+ *
21
+ *===-----------------------------------------------------------------------===
22
+ */
23
+
24
+ #ifndef __CLANG_CUDA_WRAPPERS_COMPLEX
25
+ #define __CLANG_CUDA_WRAPPERS_COMPLEX
26
+
27
+ // Wrapper around <complex> that forces its functions to be __host__
28
+ // __device__.
29
+
30
+ // First, include host-only headers we think are likely to be included by
31
+ // <complex>, so that the pragma below only applies to <complex> itself.
32
+ #if __cplusplus >= 201103L
33
+ #include <type_traits>
34
+ #endif
35
+ #include <stdexcept>
36
+ #include <cmath>
37
+ #include <sstream>
38
+
39
+ // Next, include our <algorithm> wrapper, to ensure that device overloads of
40
+ // std::min/max are available.
41
+ #include <algorithm>
42
+
43
+ #pragma clang force_cuda_host_device begin
44
+
45
+ // When compiling for device, ask libstdc++ to use its own implements of
46
+ // complex functions, rather than calling builtins (which resolve to library
47
+ // functions that don't exist when compiling CUDA device code).
48
+ //
49
+ // This is a little dicey, because it causes libstdc++ to define a different
50
+ // set of overloads on host and device.
51
+ //
52
+ // // Present only when compiling for host.
53
+ // __host__ __device__ void complex<float> sin(const complex<float>& x) {
54
+ // return __builtin_csinf(x);
55
+ // }
56
+ //
57
+ // // Present when compiling for host and for device.
58
+ // template <typename T>
59
+ // void __host__ __device__ complex<T> sin(const complex<T>& x) {
60
+ // return complex<T>(sin(x.real()) * cosh(x.imag()),
61
+ // cos(x.real()), sinh(x.imag()));
62
+ // }
63
+ //
64
+ // This is safe because when compiling for device, all function calls in
65
+ // __host__ code to sin() will still resolve to *something*, even if they don't
66
+ // resolve to the same function as they resolve to when compiling for host. We
67
+ // don't care that they don't resolve to the right function because we won't
68
+ // codegen this host code when compiling for device.
69
+
70
+ #pragma push_macro("_GLIBCXX_USE_C99_COMPLEX")
71
+ #pragma push_macro("_GLIBCXX_USE_C99_COMPLEX_TR1")
72
+ #define _GLIBCXX_USE_C99_COMPLEX 0
73
+ #define _GLIBCXX_USE_C99_COMPLEX_TR1 0
74
+
75
+ // Work around a compatibility issue with libstdc++ 11.1.0
76
+ // https://bugs.llvm.org/show_bug.cgi?id=50383
77
+ #pragma push_macro("__failed_assertion")
78
+ #if _GLIBCXX_RELEASE == 11
79
+ #define __failed_assertion __cuda_failed_assertion
80
+ #endif
81
+
82
+ #include_next <complex>
83
+
84
+ #pragma pop_macro("__failed_assertion")
85
+ #pragma pop_macro("_GLIBCXX_USE_C99_COMPLEX_TR1")
86
+ #pragma pop_macro("_GLIBCXX_USE_C99_COMPLEX")
87
+
88
+ #pragma clang force_cuda_host_device end
89
+
90
+ #endif // include guard
@@ -0,0 +1,106 @@
1
+ /*===---- new - CUDA wrapper for <new> -------------------------------------===
2
+ *
3
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ * of this software and associated documentation files (the "Software"), to deal
5
+ * in the Software without restriction, including without limitation the rights
6
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ * copies of the Software, and to permit persons to whom the Software is
8
+ * furnished to do so, subject to the following conditions:
9
+ *
10
+ * The above copyright notice and this permission notice shall be included in
11
+ * all copies or substantial portions of the Software.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ * THE SOFTWARE.
20
+ *
21
+ *===-----------------------------------------------------------------------===
22
+ */
23
+
24
+ #ifndef __CLANG_CUDA_WRAPPERS_NEW
25
+ #define __CLANG_CUDA_WRAPPERS_NEW
26
+
27
+ #include_next <new>
28
+
29
+ #if !defined(__device__)
30
+ // The header has been included too early from the standard C++ library
31
+ // and CUDA-specific macros are not available yet.
32
+ // Undo the include guard and try again later.
33
+ #undef __CLANG_CUDA_WRAPPERS_NEW
34
+ #else
35
+
36
+ #pragma push_macro("CUDA_NOEXCEPT")
37
+ #if __cplusplus >= 201103L
38
+ #define CUDA_NOEXCEPT noexcept
39
+ #else
40
+ #define CUDA_NOEXCEPT
41
+ #endif
42
+
43
+ // Device overrides for non-placement new and delete.
44
+ __device__ inline void *operator new(__SIZE_TYPE__ size) {
45
+ if (size == 0) {
46
+ size = 1;
47
+ }
48
+ return ::malloc(size);
49
+ }
50
+ __device__ inline void *operator new(__SIZE_TYPE__ size,
51
+ const std::nothrow_t &) CUDA_NOEXCEPT {
52
+ return ::operator new(size);
53
+ }
54
+
55
+ __device__ inline void *operator new[](__SIZE_TYPE__ size) {
56
+ return ::operator new(size);
57
+ }
58
+ __device__ inline void *operator new[](__SIZE_TYPE__ size,
59
+ const std::nothrow_t &) {
60
+ return ::operator new(size);
61
+ }
62
+
63
+ __device__ inline void operator delete(void* ptr) CUDA_NOEXCEPT {
64
+ if (ptr) {
65
+ ::free(ptr);
66
+ }
67
+ }
68
+ __device__ inline void operator delete(void *ptr,
69
+ const std::nothrow_t &) CUDA_NOEXCEPT {
70
+ ::operator delete(ptr);
71
+ }
72
+
73
+ __device__ inline void operator delete[](void* ptr) CUDA_NOEXCEPT {
74
+ ::operator delete(ptr);
75
+ }
76
+ __device__ inline void operator delete[](void *ptr,
77
+ const std::nothrow_t &) CUDA_NOEXCEPT {
78
+ ::operator delete(ptr);
79
+ }
80
+
81
+ // Sized delete, C++14 only.
82
+ #if __cplusplus >= 201402L
83
+ __device__ inline void operator delete(void *ptr,
84
+ __SIZE_TYPE__ size) CUDA_NOEXCEPT {
85
+ ::operator delete(ptr);
86
+ }
87
+ __device__ inline void operator delete[](void *ptr,
88
+ __SIZE_TYPE__ size) CUDA_NOEXCEPT {
89
+ ::operator delete(ptr);
90
+ }
91
+ #endif
92
+
93
+ // Device overrides for placement new and delete.
94
+ __device__ inline void *operator new(__SIZE_TYPE__, void *__ptr) CUDA_NOEXCEPT {
95
+ return __ptr;
96
+ }
97
+ __device__ inline void *operator new[](__SIZE_TYPE__, void *__ptr) CUDA_NOEXCEPT {
98
+ return __ptr;
99
+ }
100
+ __device__ inline void operator delete(void *, void *) CUDA_NOEXCEPT {}
101
+ __device__ inline void operator delete[](void *, void *) CUDA_NOEXCEPT {}
102
+
103
+ #pragma pop_macro("CUDA_NOEXCEPT")
104
+
105
+ #endif // __device__
106
+ #endif // include guard