llvm-runtime-resources-darwin 0.0.0 → 23.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (372) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +33 -0
  3. package/include/__clang_cuda_builtin_vars.h +121 -0
  4. package/include/__clang_cuda_cmath.h +512 -0
  5. package/include/__clang_cuda_complex_builtins.h +236 -0
  6. package/include/__clang_cuda_device_functions.h +1572 -0
  7. package/include/__clang_cuda_intrinsics.h +975 -0
  8. package/include/__clang_cuda_libdevice_declares.h +468 -0
  9. package/include/__clang_cuda_math.h +353 -0
  10. package/include/__clang_cuda_math_forward_declares.h +289 -0
  11. package/include/__clang_cuda_runtime_wrapper.h +526 -0
  12. package/include/__clang_cuda_texture_intrinsics.h +1177 -0
  13. package/include/__clang_gpu_builtin_vars.h +71 -0
  14. package/include/__clang_gpu_device_functions.h +411 -0
  15. package/include/__clang_gpu_intrinsics.h +242 -0
  16. package/include/__clang_hip_cmath.h +848 -0
  17. package/include/__clang_hip_libdevice_declares.h +238 -0
  18. package/include/__clang_hip_math.h +1405 -0
  19. package/include/__clang_hip_runtime_wrapper.h +170 -0
  20. package/include/__clang_hip_stdlib.h +43 -0
  21. package/include/__clang_spirv_builtins.h +217 -0
  22. package/include/__clang_spirv_libdevice_declares.h +170 -0
  23. package/include/__clang_spirv_math.h +719 -0
  24. package/include/__float_float.h +176 -0
  25. package/include/__float_header_macro.h +12 -0
  26. package/include/__float_infinity_nan.h +20 -0
  27. package/include/__stdarg___gnuc_va_list.h +13 -0
  28. package/include/__stdarg___va_copy.h +12 -0
  29. package/include/__stdarg_header_macro.h +12 -0
  30. package/include/__stdarg_va_arg.h +22 -0
  31. package/include/__stdarg_va_copy.h +12 -0
  32. package/include/__stdarg_va_list.h +13 -0
  33. package/include/__stddef_header_macro.h +12 -0
  34. package/include/__stddef_max_align_t.h +27 -0
  35. package/include/__stddef_null.h +29 -0
  36. package/include/__stddef_nullptr_t.h +29 -0
  37. package/include/__stddef_offsetof.h +17 -0
  38. package/include/__stddef_ptrdiff_t.h +20 -0
  39. package/include/__stddef_rsize_t.h +20 -0
  40. package/include/__stddef_size_t.h +20 -0
  41. package/include/__stddef_unreachable.h +21 -0
  42. package/include/__stddef_wchar_t.h +28 -0
  43. package/include/__stddef_wint_t.h +15 -0
  44. package/include/__wmmintrin_aes.h +140 -0
  45. package/include/__wmmintrin_pclmul.h +48 -0
  46. package/include/adcintrin.h +165 -0
  47. package/include/adxintrin.h +107 -0
  48. package/include/altivec.h +19434 -0
  49. package/include/amdgpuintrin.h +164 -0
  50. package/include/amdhsa_abi.h +83 -0
  51. package/include/ammintrin.h +183 -0
  52. package/include/amo.h +220 -0
  53. package/include/amxavx512intrin.h +596 -0
  54. package/include/amxcomplexintrin.h +167 -0
  55. package/include/amxfp16intrin.h +93 -0
  56. package/include/amxfp8intrin.h +230 -0
  57. package/include/amxintrin.h +492 -0
  58. package/include/amxmovrsintrin.h +48 -0
  59. package/include/andes_vector.h +21 -0
  60. package/include/arm64_neon.h +21 -0
  61. package/include/arm64intr.h +45 -0
  62. package/include/arm_acle.h +866 -0
  63. package/include/arm_bf16.h +20 -0
  64. package/include/arm_cde.h +410 -0
  65. package/include/arm_cmse.h +217 -0
  66. package/include/arm_fp16.h +596 -0
  67. package/include/arm_mve.h +19187 -0
  68. package/include/arm_neon.h +74351 -0
  69. package/include/arm_neon_sve_bridge.h +182 -0
  70. package/include/arm_sme.h +3753 -0
  71. package/include/arm_sve.h +32698 -0
  72. package/include/arm_vector_types.h +432 -0
  73. package/include/armintr.h +31 -0
  74. package/include/avx10_2_512bf16intrin.h +568 -0
  75. package/include/avx10_2_512convertintrin.h +322 -0
  76. package/include/avx10_2_512minmaxintrin.h +127 -0
  77. package/include/avx10_2_512niintrin.h +314 -0
  78. package/include/avx10_2_512satcvtdsintrin.h +307 -0
  79. package/include/avx10_2_512satcvtintrin.h +301 -0
  80. package/include/avx10_2bf16intrin.h +1094 -0
  81. package/include/avx10_2convertintrin.h +3257 -0
  82. package/include/avx10_2copyintrin.h +66 -0
  83. package/include/avx10_2minmaxintrin.h +232 -0
  84. package/include/avx10_2niintrin.h +409 -0
  85. package/include/avx10_2satcvtdsintrin.h +376 -0
  86. package/include/avx10_2satcvtintrin.h +312 -0
  87. package/include/avx2intrin.h +5190 -0
  88. package/include/avx512bf16intrin.h +292 -0
  89. package/include/avx512bitalgintrin.h +75 -0
  90. package/include/avx512bmmintrin.h +174 -0
  91. package/include/avx512bmmvlintrin.h +245 -0
  92. package/include/avx512bwintrin.h +1885 -0
  93. package/include/avx512cdintrin.h +112 -0
  94. package/include/avx512dqintrin.h +1350 -0
  95. package/include/avx512fintrin.h +9351 -0
  96. package/include/avx512fp16intrin.h +3349 -0
  97. package/include/avx512ifmaintrin.h +68 -0
  98. package/include/avx512ifmavlintrin.h +138 -0
  99. package/include/avx512vbmi2intrin.h +364 -0
  100. package/include/avx512vbmiintrin.h +98 -0
  101. package/include/avx512vbmivlintrin.h +179 -0
  102. package/include/avx512vlbf16intrin.h +527 -0
  103. package/include/avx512vlbitalgintrin.h +135 -0
  104. package/include/avx512vlbwintrin.h +3052 -0
  105. package/include/avx512vlcdintrin.h +202 -0
  106. package/include/avx512vldqintrin.h +1156 -0
  107. package/include/avx512vlfp16intrin.h +2090 -0
  108. package/include/avx512vlintrin.h +8067 -0
  109. package/include/avx512vlvbmi2intrin.h +702 -0
  110. package/include/avx512vlvnniintrin.h +308 -0
  111. package/include/avx512vlvp2intersectintrin.h +123 -0
  112. package/include/avx512vnniintrin.h +113 -0
  113. package/include/avx512vp2intersectintrin.h +77 -0
  114. package/include/avx512vpopcntdqintrin.h +62 -0
  115. package/include/avx512vpopcntdqvlintrin.h +105 -0
  116. package/include/avxifmaintrin.h +193 -0
  117. package/include/avxintrin.h +5064 -0
  118. package/include/avxneconvertintrin.h +484 -0
  119. package/include/avxvnniint16intrin.h +451 -0
  120. package/include/avxvnniint8intrin.h +454 -0
  121. package/include/avxvnniintrin.h +238 -0
  122. package/include/bmi2intrin.h +253 -0
  123. package/include/bmiintrin.h +604 -0
  124. package/include/builtins.h +19 -0
  125. package/include/cet.h +66 -0
  126. package/include/cetintrin.h +115 -0
  127. package/include/cldemoteintrin.h +36 -0
  128. package/include/clflushoptintrin.h +36 -0
  129. package/include/clwbintrin.h +38 -0
  130. package/include/clzerointrin.h +38 -0
  131. package/include/cmpccxaddintrin.h +70 -0
  132. package/include/cpuid.h +451 -0
  133. package/include/crc32intrin.h +102 -0
  134. package/include/cuda_wrappers/__utility/declval.h +28 -0
  135. package/include/cuda_wrappers/algorithm +116 -0
  136. package/include/cuda_wrappers/bits/basic_string.h +9 -0
  137. package/include/cuda_wrappers/bits/basic_string.tcc +9 -0
  138. package/include/cuda_wrappers/bits/c++config.h +61 -0
  139. package/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
  140. package/include/cuda_wrappers/cmath +44 -0
  141. package/include/cuda_wrappers/complex +90 -0
  142. package/include/cuda_wrappers/new +108 -0
  143. package/include/emmintrin.h +4940 -0
  144. package/include/endian.h +91 -0
  145. package/include/enqcmdintrin.h +63 -0
  146. package/include/f16cintrin.h +176 -0
  147. package/include/float.h +48 -0
  148. package/include/fma4intrin.h +220 -0
  149. package/include/fmaintrin.h +826 -0
  150. package/include/fuzzer/FuzzedDataProvider.h +397 -0
  151. package/include/fxsrintrin.h +91 -0
  152. package/include/gfniintrin.h +238 -0
  153. package/include/gpuintrin.h +348 -0
  154. package/include/hexagon_circ_brev_intrinsics.h +298 -0
  155. package/include/hexagon_protos.h +8439 -0
  156. package/include/hexagon_types.h +2628 -0
  157. package/include/hlsl_alias_intrinsics_gen.inc +3869 -0
  158. package/include/hlsl_inline_intrinsics_gen.inc +546 -0
  159. package/include/hresetintrin.h +49 -0
  160. package/include/htmintrin.h +212 -0
  161. package/include/htmxlintrin.h +345 -0
  162. package/include/hvx_hexagon_protos.h +5421 -0
  163. package/include/ia32intrin.h +863 -0
  164. package/include/immintrin.h +597 -0
  165. package/include/intrin.h +501 -0
  166. package/include/intrin0.h +256 -0
  167. package/include/inttypes.h +101 -0
  168. package/include/invpcidintrin.h +23 -0
  169. package/include/iso646.h +31 -0
  170. package/include/keylockerintrin.h +518 -0
  171. package/include/larchintrin.h +262 -0
  172. package/include/lasxintrin.h +3999 -0
  173. package/include/limits.h +133 -0
  174. package/include/llvm_libc_wrappers/assert.h +32 -0
  175. package/include/llvm_libc_wrappers/ctype.h +29 -0
  176. package/include/llvm_libc_wrappers/inttypes.h +32 -0
  177. package/include/llvm_libc_wrappers/stdio.h +52 -0
  178. package/include/llvm_libc_wrappers/stdlib.h +32 -0
  179. package/include/llvm_libc_wrappers/string.h +29 -0
  180. package/include/llvm_libc_wrappers/time.h +28 -0
  181. package/include/llvm_offload_wrappers/__llvm_offload.h +31 -0
  182. package/include/llvm_offload_wrappers/__llvm_offload_device.h +10 -0
  183. package/include/llvm_offload_wrappers/__llvm_offload_host.h +15 -0
  184. package/include/lsxintrin.h +3752 -0
  185. package/include/lwpintrin.h +136 -0
  186. package/include/lzcntintrin.h +109 -0
  187. package/include/mm3dnow.h +22 -0
  188. package/include/mm_malloc.h +67 -0
  189. package/include/mmintrin.h +1541 -0
  190. package/include/module.modulemap +375 -0
  191. package/include/movdirintrin.h +49 -0
  192. package/include/movrs_avx10_2_512intrin.h +98 -0
  193. package/include/movrs_avx10_2intrin.h +174 -0
  194. package/include/movrsintrin.h +59 -0
  195. package/include/msa.h +573 -0
  196. package/include/mwaitxintrin.h +62 -0
  197. package/include/nmmintrin.h +20 -0
  198. package/include/nvptxintrin.h +208 -0
  199. package/include/opencl-c-base.h +765 -0
  200. package/include/opencl-c.h +18737 -0
  201. package/include/openmp_wrappers/__clang_openmp_device_functions.h +118 -0
  202. package/include/openmp_wrappers/cmath +132 -0
  203. package/include/openmp_wrappers/complex +61 -0
  204. package/include/openmp_wrappers/complex.h +41 -0
  205. package/include/openmp_wrappers/complex_cmath.h +393 -0
  206. package/include/openmp_wrappers/math.h +71 -0
  207. package/include/openmp_wrappers/new +48 -0
  208. package/include/pconfigintrin.h +40 -0
  209. package/include/pkuintrin.h +34 -0
  210. package/include/pmmintrin.h +302 -0
  211. package/include/popcntintrin.h +59 -0
  212. package/include/ppc_wrappers/bmi2intrin.h +134 -0
  213. package/include/ppc_wrappers/bmiintrin.h +165 -0
  214. package/include/ppc_wrappers/emmintrin.h +2269 -0
  215. package/include/ppc_wrappers/immintrin.h +27 -0
  216. package/include/ppc_wrappers/mm_malloc.h +45 -0
  217. package/include/ppc_wrappers/mmintrin.h +1453 -0
  218. package/include/ppc_wrappers/nmmintrin.h +26 -0
  219. package/include/ppc_wrappers/pmmintrin.h +145 -0
  220. package/include/ppc_wrappers/smmintrin.h +683 -0
  221. package/include/ppc_wrappers/tmmintrin.h +453 -0
  222. package/include/ppc_wrappers/x86gprintrin.h +17 -0
  223. package/include/ppc_wrappers/x86intrin.h +28 -0
  224. package/include/ppc_wrappers/xmmintrin.h +1827 -0
  225. package/include/prfchiintrin.h +61 -0
  226. package/include/prfchwintrin.h +57 -0
  227. package/include/profile/InstrProfData.inc +1063 -0
  228. package/include/profile/instr_prof_interface.h +88 -0
  229. package/include/ptrauth.h +485 -0
  230. package/include/ptwriteintrin.h +37 -0
  231. package/include/raointintrin.h +203 -0
  232. package/include/rdpruintrin.h +57 -0
  233. package/include/rdseedintrin.h +105 -0
  234. package/include/riscv_bitmanip.h +202 -0
  235. package/include/riscv_corev_alu.h +130 -0
  236. package/include/riscv_crypto.h +178 -0
  237. package/include/riscv_mips.h +36 -0
  238. package/include/riscv_nds.h +92 -0
  239. package/include/riscv_ntlh.h +28 -0
  240. package/include/riscv_packed_simd.h +644 -0
  241. package/include/riscv_vector.h +465 -0
  242. package/include/rtmintrin.h +45 -0
  243. package/include/s390intrin.h +25 -0
  244. package/include/sanitizer/allocator_interface.h +106 -0
  245. package/include/sanitizer/asan_interface.h +398 -0
  246. package/include/sanitizer/common_interface_defs.h +507 -0
  247. package/include/sanitizer/coverage_interface.h +36 -0
  248. package/include/sanitizer/dfsan_interface.h +220 -0
  249. package/include/sanitizer/hwasan_interface.h +109 -0
  250. package/include/sanitizer/linux_syscall_hooks.h +3112 -0
  251. package/include/sanitizer/lsan_interface.h +89 -0
  252. package/include/sanitizer/msan_interface.h +135 -0
  253. package/include/sanitizer/netbsd_syscall_hooks.h +5005 -0
  254. package/include/sanitizer/rtsan_interface.h +75 -0
  255. package/include/sanitizer/safestack_interface.h +50 -0
  256. package/include/sanitizer/scudo_interface.h +38 -0
  257. package/include/sanitizer/tsan_interface.h +316 -0
  258. package/include/sanitizer/tsan_interface_atomic.h +223 -0
  259. package/include/sanitizer/tysan_interface.h +36 -0
  260. package/include/sanitizer/ubsan_interface.h +64 -0
  261. package/include/serializeintrin.h +30 -0
  262. package/include/sgxintrin.h +60 -0
  263. package/include/sha512intrin.h +200 -0
  264. package/include/shaintrin.h +190 -0
  265. package/include/sifive_vector.h +192 -0
  266. package/include/sm3intrin.h +238 -0
  267. package/include/sm4evexintrin.h +32 -0
  268. package/include/sm4intrin.h +269 -0
  269. package/include/smmintrin.h +2352 -0
  270. package/include/spirvintrin.h +167 -0
  271. package/include/stdalign.h +24 -0
  272. package/include/stdarg.h +75 -0
  273. package/include/stdatomic.h +204 -0
  274. package/include/stdbool.h +39 -0
  275. package/include/stdckdint.h +42 -0
  276. package/include/stdcountof.h +15 -0
  277. package/include/stddef.h +139 -0
  278. package/include/stddefer.h +19 -0
  279. package/include/stdint.h +835 -0
  280. package/include/stdnoreturn.h +35 -0
  281. package/include/tbmintrin.h +128 -0
  282. package/include/tgmath.h +1368 -0
  283. package/include/tmmintrin.h +779 -0
  284. package/include/tsxldtrkintrin.h +56 -0
  285. package/include/uintrintrin.h +157 -0
  286. package/include/unwind.h +332 -0
  287. package/include/usermsrintrin.h +51 -0
  288. package/include/vadefs.h +51 -0
  289. package/include/vaesintrin.h +86 -0
  290. package/include/varargs.h +16 -0
  291. package/include/vecintrin.h +12868 -0
  292. package/include/velintrin.h +71 -0
  293. package/include/velintrin_approx.h +120 -0
  294. package/include/velintrin_gen.h +1257 -0
  295. package/include/vpclmulqdqintrin.h +30 -0
  296. package/include/waitpkgintrin.h +42 -0
  297. package/include/wasm_simd128.h +2160 -0
  298. package/include/wbnoinvdintrin.h +24 -0
  299. package/include/wmmintrin.h +23 -0
  300. package/include/x86gprintrin.h +49 -0
  301. package/include/x86intrin.h +35 -0
  302. package/include/xmmintrin.h +3176 -0
  303. package/include/xopintrin.h +780 -0
  304. package/include/xsavecintrin.h +84 -0
  305. package/include/xsaveintrin.h +63 -0
  306. package/include/xsaveoptintrin.h +34 -0
  307. package/include/xsavesintrin.h +44 -0
  308. package/include/xtestintrin.h +27 -0
  309. package/include/yvals_core.h +25 -0
  310. package/include/zos_wrappers/builtins.h +18 -0
  311. package/include/zos_wrappers/grp.h +19 -0
  312. package/include/zos_wrappers/locale.h +19 -0
  313. package/include/zos_wrappers/math.h +31 -0
  314. package/include/zos_wrappers/poll.h +19 -0
  315. package/include/zos_wrappers/stdlib.h +20 -0
  316. package/include/zos_wrappers/string.h +19 -0
  317. package/include/zos_wrappers/time.h +19 -0
  318. package/include/zos_wrappers/variant.h +19 -0
  319. package/index.js +5 -0
  320. package/lib/darwin/libclang_rt.asan_abi_ios.a +0 -0
  321. package/lib/darwin/libclang_rt.asan_abi_iossim.a +0 -0
  322. package/lib/darwin/libclang_rt.asan_abi_osx.a +0 -0
  323. package/lib/darwin/libclang_rt.asan_ios_dynamic.dylib +0 -0
  324. package/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
  325. package/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
  326. package/lib/darwin/libclang_rt.cc_kext.a +0 -0
  327. package/lib/darwin/libclang_rt.cc_kext_ios.a +0 -0
  328. package/lib/darwin/libclang_rt.fuzzer_interceptors_ios.a +0 -0
  329. package/lib/darwin/libclang_rt.fuzzer_interceptors_iossim.a +0 -0
  330. package/lib/darwin/libclang_rt.fuzzer_interceptors_osx.a +0 -0
  331. package/lib/darwin/libclang_rt.fuzzer_ios.a +0 -0
  332. package/lib/darwin/libclang_rt.fuzzer_iossim.a +0 -0
  333. package/lib/darwin/libclang_rt.fuzzer_no_main_ios.a +0 -0
  334. package/lib/darwin/libclang_rt.fuzzer_no_main_iossim.a +0 -0
  335. package/lib/darwin/libclang_rt.fuzzer_no_main_osx.a +0 -0
  336. package/lib/darwin/libclang_rt.fuzzer_osx.a +0 -0
  337. package/lib/darwin/libclang_rt.ios.a +0 -0
  338. package/lib/darwin/libclang_rt.iossim.a +0 -0
  339. package/lib/darwin/libclang_rt.lsan_ios_dynamic.dylib +0 -0
  340. package/lib/darwin/libclang_rt.lsan_iossim_dynamic.dylib +0 -0
  341. package/lib/darwin/libclang_rt.lsan_osx_dynamic.dylib +0 -0
  342. package/lib/darwin/libclang_rt.osx.a +0 -0
  343. package/lib/darwin/libclang_rt.profile_ios.a +0 -0
  344. package/lib/darwin/libclang_rt.profile_iossim.a +0 -0
  345. package/lib/darwin/libclang_rt.profile_osx.a +0 -0
  346. package/lib/darwin/libclang_rt.rtsan_ios_dynamic.dylib +0 -0
  347. package/lib/darwin/libclang_rt.rtsan_iossim_dynamic.dylib +0 -0
  348. package/lib/darwin/libclang_rt.rtsan_osx_dynamic.dylib +0 -0
  349. package/lib/darwin/libclang_rt.stats_client_ios.a +0 -0
  350. package/lib/darwin/libclang_rt.stats_client_iossim.a +0 -0
  351. package/lib/darwin/libclang_rt.stats_client_osx.a +0 -0
  352. package/lib/darwin/libclang_rt.stats_ios_dynamic.dylib +0 -0
  353. package/lib/darwin/libclang_rt.stats_iossim_dynamic.dylib +0 -0
  354. package/lib/darwin/libclang_rt.stats_osx_dynamic.dylib +0 -0
  355. package/lib/darwin/libclang_rt.tsan_ios_dynamic.dylib +0 -0
  356. package/lib/darwin/libclang_rt.tsan_iossim_dynamic.dylib +0 -0
  357. package/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib +0 -0
  358. package/lib/darwin/libclang_rt.tysan_ios_dynamic.dylib +0 -0
  359. package/lib/darwin/libclang_rt.tysan_iossim_dynamic.dylib +0 -0
  360. package/lib/darwin/libclang_rt.tysan_osx_dynamic.dylib +0 -0
  361. package/lib/darwin/libclang_rt.ubsan_ios_dynamic.dylib +0 -0
  362. package/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
  363. package/lib/darwin/libclang_rt.ubsan_minimal_ios.a +0 -0
  364. package/lib/darwin/libclang_rt.ubsan_minimal_ios_dynamic.dylib +0 -0
  365. package/lib/darwin/libclang_rt.ubsan_minimal_iossim.a +0 -0
  366. package/lib/darwin/libclang_rt.ubsan_minimal_iossim_dynamic.dylib +0 -0
  367. package/lib/darwin/libclang_rt.ubsan_minimal_osx.a +0 -0
  368. package/lib/darwin/libclang_rt.ubsan_minimal_osx_dynamic.dylib +0 -0
  369. package/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
  370. package/package.json +40 -1
  371. package/share/asan_ignorelist.txt +14 -0
  372. package/share/cfi_ignorelist.txt +17 -0
@@ -0,0 +1,765 @@
1
+ //===----- opencl-c-base.h - OpenCL C language base definitions -----------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #ifndef _OPENCL_BASE_H_
10
+ #define _OPENCL_BASE_H_
11
+
12
+ #if !defined(__opencl_c_generic_address_space)
13
+ // Internal feature macro to provide named (global, local, private) address
14
+ // space overloads for builtin functions that take a pointer argument.
15
+ #define __opencl_c_named_address_space_builtins 1
16
+ #endif // !defined(__opencl_c_generic_address_space)
17
+
18
+ #if defined(cl_intel_subgroups) || defined(cl_khr_subgroups) || defined(__opencl_c_subgroups)
19
+ // Internal feature macro to provide subgroup builtins.
20
+ #define __opencl_subgroup_builtins 1
21
+ #endif
22
+
23
+ #if defined(cl_khr_depth_images) || defined(__OPENCL_CPP_VERSION__) || \
24
+ (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
25
+ // Internal feature macro to provide depth image builtins.
26
+ #define __opencl_depth_image_builtins 1
27
+ #endif // defined(cl_khr_depth_images) || defined(__OPENCL_CPP_VERSION__) ||
28
+ // (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
29
+
30
+ // built-in scalar data types:
31
+
32
+ /**
33
+ * An unsigned 8-bit integer.
34
+ */
35
+ typedef unsigned char uchar;
36
+
37
+ /**
38
+ * An unsigned 16-bit integer.
39
+ */
40
+ typedef unsigned short ushort;
41
+
42
+ /**
43
+ * An unsigned 32-bit integer.
44
+ */
45
+ typedef unsigned int uint;
46
+
47
+ /**
48
+ * An unsigned 64-bit integer.
49
+ */
50
+ typedef unsigned long ulong;
51
+
52
+ /**
53
+ * The unsigned integer type of the result of the sizeof operator. This
54
+ * is a 32-bit unsigned integer if CL_DEVICE_ADDRESS_BITS
55
+ * defined in table 4.3 is 32-bits and is a 64-bit unsigned integer if
56
+ * CL_DEVICE_ADDRESS_BITS is 64-bits.
57
+ */
58
+ typedef __SIZE_TYPE__ size_t;
59
+
60
+ /**
61
+ * A signed integer type that is the result of subtracting two pointers.
62
+ * This is a 32-bit signed integer if CL_DEVICE_ADDRESS_BITS
63
+ * defined in table 4.3 is 32-bits and is a 64-bit signed integer if
64
+ * CL_DEVICE_ADDRESS_BITS is 64-bits.
65
+ */
66
+ typedef __PTRDIFF_TYPE__ ptrdiff_t;
67
+
68
+ /**
69
+ * A signed integer type with the property that any valid pointer to
70
+ * void can be converted to this type, then converted back to pointer
71
+ * to void, and the result will compare equal to the original pointer.
72
+ */
73
+ typedef __INTPTR_TYPE__ intptr_t;
74
+
75
+ /**
76
+ * An unsigned integer type with the property that any valid pointer to
77
+ * void can be converted to this type, then converted back to pointer
78
+ * to void, and the result will compare equal to the original pointer.
79
+ */
80
+ typedef __UINTPTR_TYPE__ uintptr_t;
81
+
82
+ // built-in vector data types:
83
+ typedef char char2 __attribute__((ext_vector_type(2)));
84
+ typedef char char3 __attribute__((ext_vector_type(3)));
85
+ typedef char char4 __attribute__((ext_vector_type(4)));
86
+ typedef char char8 __attribute__((ext_vector_type(8)));
87
+ typedef char char16 __attribute__((ext_vector_type(16)));
88
+ typedef uchar uchar2 __attribute__((ext_vector_type(2)));
89
+ typedef uchar uchar3 __attribute__((ext_vector_type(3)));
90
+ typedef uchar uchar4 __attribute__((ext_vector_type(4)));
91
+ typedef uchar uchar8 __attribute__((ext_vector_type(8)));
92
+ typedef uchar uchar16 __attribute__((ext_vector_type(16)));
93
+ typedef short short2 __attribute__((ext_vector_type(2)));
94
+ typedef short short3 __attribute__((ext_vector_type(3)));
95
+ typedef short short4 __attribute__((ext_vector_type(4)));
96
+ typedef short short8 __attribute__((ext_vector_type(8)));
97
+ typedef short short16 __attribute__((ext_vector_type(16)));
98
+ typedef ushort ushort2 __attribute__((ext_vector_type(2)));
99
+ typedef ushort ushort3 __attribute__((ext_vector_type(3)));
100
+ typedef ushort ushort4 __attribute__((ext_vector_type(4)));
101
+ typedef ushort ushort8 __attribute__((ext_vector_type(8)));
102
+ typedef ushort ushort16 __attribute__((ext_vector_type(16)));
103
+ typedef int int2 __attribute__((ext_vector_type(2)));
104
+ typedef int int3 __attribute__((ext_vector_type(3)));
105
+ typedef int int4 __attribute__((ext_vector_type(4)));
106
+ typedef int int8 __attribute__((ext_vector_type(8)));
107
+ typedef int int16 __attribute__((ext_vector_type(16)));
108
+ typedef uint uint2 __attribute__((ext_vector_type(2)));
109
+ typedef uint uint3 __attribute__((ext_vector_type(3)));
110
+ typedef uint uint4 __attribute__((ext_vector_type(4)));
111
+ typedef uint uint8 __attribute__((ext_vector_type(8)));
112
+ typedef uint uint16 __attribute__((ext_vector_type(16)));
113
+ typedef long long2 __attribute__((ext_vector_type(2)));
114
+ typedef long long3 __attribute__((ext_vector_type(3)));
115
+ typedef long long4 __attribute__((ext_vector_type(4)));
116
+ typedef long long8 __attribute__((ext_vector_type(8)));
117
+ typedef long long16 __attribute__((ext_vector_type(16)));
118
+ typedef ulong ulong2 __attribute__((ext_vector_type(2)));
119
+ typedef ulong ulong3 __attribute__((ext_vector_type(3)));
120
+ typedef ulong ulong4 __attribute__((ext_vector_type(4)));
121
+ typedef ulong ulong8 __attribute__((ext_vector_type(8)));
122
+ typedef ulong ulong16 __attribute__((ext_vector_type(16)));
123
+ typedef float float2 __attribute__((ext_vector_type(2)));
124
+ typedef float float3 __attribute__((ext_vector_type(3)));
125
+ typedef float float4 __attribute__((ext_vector_type(4)));
126
+ typedef float float8 __attribute__((ext_vector_type(8)));
127
+ typedef float float16 __attribute__((ext_vector_type(16)));
128
+ #ifdef cl_khr_fp16
129
+ #pragma OPENCL EXTENSION cl_khr_fp16 : enable
130
+ typedef half half2 __attribute__((ext_vector_type(2)));
131
+ typedef half half3 __attribute__((ext_vector_type(3)));
132
+ typedef half half4 __attribute__((ext_vector_type(4)));
133
+ typedef half half8 __attribute__((ext_vector_type(8)));
134
+ typedef half half16 __attribute__((ext_vector_type(16)));
135
+ #endif
136
+ #ifdef cl_khr_fp64
137
+ #if __OPENCL_C_VERSION__ < CL_VERSION_1_2
138
+ #pragma OPENCL EXTENSION cl_khr_fp64 : enable
139
+ #endif
140
+ typedef double double2 __attribute__((ext_vector_type(2)));
141
+ typedef double double3 __attribute__((ext_vector_type(3)));
142
+ typedef double double4 __attribute__((ext_vector_type(4)));
143
+ typedef double double8 __attribute__((ext_vector_type(8)));
144
+ typedef double double16 __attribute__((ext_vector_type(16)));
145
+ #endif
146
+
147
+ // An internal alias for half, for use by OpenCLBuiltins.td.
148
+ #define __half half
149
+
150
+ #if defined(__OPENCL_CPP_VERSION__)
151
+ #define NULL nullptr
152
+ #elif defined(__OPENCL_C_VERSION__)
153
+ #define NULL ((void*)0)
154
+ #endif
155
+
156
+ /**
157
+ * Value of maximum non-infinite single-precision floating-point
158
+ * number.
159
+ */
160
+ #define MAXFLOAT 0x1.fffffep127f
161
+
162
+ /**
163
+ * A positive float constant expression. HUGE_VALF evaluates
164
+ * to +infinity. Used as an error value returned by the built-in
165
+ * math functions.
166
+ */
167
+ #define HUGE_VALF (__builtin_huge_valf())
168
+
169
+ /**
170
+ * A positive double constant expression. HUGE_VAL evaluates
171
+ * to +infinity. Used as an error value returned by the built-in
172
+ * math functions.
173
+ */
174
+ #define HUGE_VAL (__builtin_huge_val())
175
+
176
+ /**
177
+ * A constant expression of type float representing positive or
178
+ * unsigned infinity.
179
+ */
180
+ #define INFINITY (__builtin_inff())
181
+
182
+ /**
183
+ * A constant expression of type float representing a quiet NaN.
184
+ */
185
+ #define NAN as_float(INT_MAX)
186
+
187
+ #define FP_ILOGB0 INT_MIN
188
+ #define FP_ILOGBNAN INT_MAX
189
+
190
+ #define FLT_DIG 6
191
+ #define FLT_MANT_DIG 24
192
+ #define FLT_MAX_10_EXP +38
193
+ #define FLT_MAX_EXP +128
194
+ #define FLT_MIN_10_EXP -37
195
+ #define FLT_MIN_EXP -125
196
+ #define FLT_RADIX 2
197
+ #define FLT_MAX 0x1.fffffep127f
198
+ #define FLT_MIN 0x1.0p-126f
199
+ #define FLT_EPSILON 0x1.0p-23f
200
+
201
+ #define M_E_F 2.71828182845904523536028747135266250f
202
+ #define M_LOG2E_F 1.44269504088896340735992468100189214f
203
+ #define M_LOG10E_F 0.434294481903251827651128918916605082f
204
+ #define M_LN2_F 0.693147180559945309417232121458176568f
205
+ #define M_LN10_F 2.30258509299404568401799145468436421f
206
+ #define M_PI_F 3.14159265358979323846264338327950288f
207
+ #define M_PI_2_F 1.57079632679489661923132169163975144f
208
+ #define M_PI_4_F 0.785398163397448309615660845819875721f
209
+ #define M_1_PI_F 0.318309886183790671537767526745028724f
210
+ #define M_2_PI_F 0.636619772367581343075535053490057448f
211
+ #define M_2_SQRTPI_F 1.12837916709551257389615890312154517f
212
+ #define M_SQRT2_F 1.41421356237309504880168872420969808f
213
+ #define M_SQRT1_2_F 0.707106781186547524400844362104849039f
214
+
215
+ #define DBL_DIG 15
216
+ #define DBL_MANT_DIG 53
217
+ #define DBL_MAX_10_EXP +308
218
+ #define DBL_MAX_EXP +1024
219
+ #define DBL_MIN_10_EXP -307
220
+ #define DBL_MIN_EXP -1021
221
+ #define DBL_RADIX 2
222
+ #define DBL_MAX 0x1.fffffffffffffp1023
223
+ #define DBL_MIN 0x1.0p-1022
224
+ #define DBL_EPSILON 0x1.0p-52
225
+
226
+ #define M_E 0x1.5bf0a8b145769p+1
227
+ #define M_LOG2E 0x1.71547652b82fep+0
228
+ #define M_LOG10E 0x1.bcb7b1526e50ep-2
229
+ #define M_LN2 0x1.62e42fefa39efp-1
230
+ #define M_LN10 0x1.26bb1bbb55516p+1
231
+ #define M_PI 0x1.921fb54442d18p+1
232
+ #define M_PI_2 0x1.921fb54442d18p+0
233
+ #define M_PI_4 0x1.921fb54442d18p-1
234
+ #define M_1_PI 0x1.45f306dc9c883p-2
235
+ #define M_2_PI 0x1.45f306dc9c883p-1
236
+ #define M_2_SQRTPI 0x1.20dd750429b6dp+0
237
+ #define M_SQRT2 0x1.6a09e667f3bcdp+0
238
+ #define M_SQRT1_2 0x1.6a09e667f3bcdp-1
239
+
240
+ #ifdef cl_khr_fp16
241
+
242
+ #define HALF_DIG 3
243
+ #define HALF_MANT_DIG 11
244
+ #define HALF_MAX_10_EXP +4
245
+ #define HALF_MAX_EXP +16
246
+ #define HALF_MIN_10_EXP -4
247
+ #define HALF_MIN_EXP -13
248
+ #define HALF_RADIX 2
249
+ #define HALF_MAX ((0x1.ffcp15h))
250
+ #define HALF_MIN ((0x1.0p-14h))
251
+ #define HALF_EPSILON ((0x1.0p-10h))
252
+
253
+ #define M_E_H 2.71828182845904523536028747135266250h
254
+ #define M_LOG2E_H 1.44269504088896340735992468100189214h
255
+ #define M_LOG10E_H 0.434294481903251827651128918916605082h
256
+ #define M_LN2_H 0.693147180559945309417232121458176568h
257
+ #define M_LN10_H 2.30258509299404568401799145468436421h
258
+ #define M_PI_H 3.14159265358979323846264338327950288h
259
+ #define M_PI_2_H 1.57079632679489661923132169163975144h
260
+ #define M_PI_4_H 0.785398163397448309615660845819875721h
261
+ #define M_1_PI_H 0.318309886183790671537767526745028724h
262
+ #define M_2_PI_H 0.636619772367581343075535053490057448h
263
+ #define M_2_SQRTPI_H 1.12837916709551257389615890312154517h
264
+ #define M_SQRT2_H 1.41421356237309504880168872420969808h
265
+ #define M_SQRT1_2_H 0.707106781186547524400844362104849039h
266
+
267
+ #endif //cl_khr_fp16
268
+
269
+ #define CHAR_BIT 8
270
+ #define SCHAR_MAX 127
271
+ #define SCHAR_MIN (-128)
272
+ #define UCHAR_MAX 255
273
+ #define CHAR_MAX SCHAR_MAX
274
+ #define CHAR_MIN SCHAR_MIN
275
+ #define USHRT_MAX 65535
276
+ #define SHRT_MAX 32767
277
+ #define SHRT_MIN (-32768)
278
+ #define UINT_MAX 0xffffffff
279
+ #define INT_MAX 2147483647
280
+ #define INT_MIN (-2147483647-1)
281
+ #define ULONG_MAX 0xffffffffffffffffUL
282
+ #define LONG_MAX 0x7fffffffffffffffL
283
+ #define LONG_MIN (-0x7fffffffffffffffL-1)
284
+
285
+ // OpenCL v1.1 s6.11.8, v1.2 s6.12.8, v2.0 s6.13.8 - Synchronization Functions
286
+
287
+ // Flag type and values for barrier, mem_fence, read_mem_fence, write_mem_fence
288
+ typedef uint cl_mem_fence_flags;
289
+
290
+ /**
291
+ * Queue a memory fence to ensure correct
292
+ * ordering of memory operations to local memory
293
+ */
294
+ #define CLK_LOCAL_MEM_FENCE 0x01
295
+
296
+ /**
297
+ * Queue a memory fence to ensure correct
298
+ * ordering of memory operations to global memory
299
+ */
300
+ #define CLK_GLOBAL_MEM_FENCE 0x02
301
+
302
+ #if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
303
+
304
+ typedef enum memory_scope {
305
+ memory_scope_work_item = __OPENCL_MEMORY_SCOPE_WORK_ITEM,
306
+ memory_scope_work_group = __OPENCL_MEMORY_SCOPE_WORK_GROUP,
307
+ memory_scope_device = __OPENCL_MEMORY_SCOPE_DEVICE,
308
+ #if defined(__opencl_c_atomic_scope_all_devices)
309
+ memory_scope_all_svm_devices = __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES,
310
+ #if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
311
+ memory_scope_all_devices = memory_scope_all_svm_devices,
312
+ #endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
313
+ #endif // defined(__opencl_c_atomic_scope_all_devices)
314
+ /**
315
+ * Subgroups have different requirements on forward progress, so just test
316
+ * all the relevant macros.
317
+ * CL 3.0 sub-groups "they are not guaranteed to make independent forward progress"
318
+ * KHR subgroups "Subgroups within a workgroup are independent, make forward progress with respect to each other"
319
+ */
320
+ #if defined(cl_intel_subgroups) || defined(cl_khr_subgroups) || defined(__opencl_c_subgroups)
321
+ memory_scope_sub_group = __OPENCL_MEMORY_SCOPE_SUB_GROUP
322
+ #endif
323
+ } memory_scope;
324
+
325
+ /**
326
+ * Queue a memory fence to ensure correct ordering of memory
327
+ * operations between work-items of a work-group to
328
+ * image memory.
329
+ */
330
+ #define CLK_IMAGE_MEM_FENCE 0x04
331
+
332
+ #ifndef ATOMIC_VAR_INIT
333
+ #define ATOMIC_VAR_INIT(x) (x)
334
+ #endif //ATOMIC_VAR_INIT
335
+ #define ATOMIC_FLAG_INIT 0
336
+
337
+ // enum values aligned with what clang uses in EmitAtomicExpr()
338
+ typedef enum memory_order
339
+ {
340
+ memory_order_relaxed = __ATOMIC_RELAXED,
341
+ memory_order_acquire = __ATOMIC_ACQUIRE,
342
+ memory_order_release = __ATOMIC_RELEASE,
343
+ memory_order_acq_rel = __ATOMIC_ACQ_REL,
344
+ #if defined(__opencl_c_atomic_order_seq_cst)
345
+ memory_order_seq_cst = __ATOMIC_SEQ_CST
346
+ #endif
347
+ } memory_order;
348
+
349
+ #endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
350
+
351
+ // OpenCL v1.1 s6.11.3, v1.2 s6.12.14, v2.0 s6.13.14 - Image Read and Write Functions
352
+
353
+ // These values need to match the runtime equivalent
354
+ //
355
+ // Addressing Mode.
356
+ //
357
+ #define CLK_ADDRESS_NONE 0
358
+ #define CLK_ADDRESS_CLAMP_TO_EDGE 2
359
+ #define CLK_ADDRESS_CLAMP 4
360
+ #define CLK_ADDRESS_REPEAT 6
361
+ #define CLK_ADDRESS_MIRRORED_REPEAT 8
362
+
363
+ //
364
+ // Coordination Normalization
365
+ //
366
+ #define CLK_NORMALIZED_COORDS_FALSE 0
367
+ #define CLK_NORMALIZED_COORDS_TRUE 1
368
+
369
+ //
370
+ // Filtering Mode.
371
+ //
372
+ #define CLK_FILTER_NEAREST 0x10
373
+ #define CLK_FILTER_LINEAR 0x20
374
+
375
+ #ifdef cl_khr_gl_msaa_sharing
376
+ #pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing : enable
377
+ #endif //cl_khr_gl_msaa_sharing
378
+
379
+ //
380
+ // Channel Datatype.
381
+ //
382
+ #define CLK_SNORM_INT8 0x10D0
383
+ #define CLK_SNORM_INT16 0x10D1
384
+ #define CLK_UNORM_INT8 0x10D2
385
+ #define CLK_UNORM_INT16 0x10D3
386
+ #define CLK_UNORM_SHORT_565 0x10D4
387
+ #define CLK_UNORM_SHORT_555 0x10D5
388
+ #define CLK_UNORM_INT_101010 0x10D6
389
+ #define CLK_SIGNED_INT8 0x10D7
390
+ #define CLK_SIGNED_INT16 0x10D8
391
+ #define CLK_SIGNED_INT32 0x10D9
392
+ #define CLK_UNSIGNED_INT8 0x10DA
393
+ #define CLK_UNSIGNED_INT16 0x10DB
394
+ #define CLK_UNSIGNED_INT32 0x10DC
395
+ #define CLK_HALF_FLOAT 0x10DD
396
+ #define CLK_FLOAT 0x10DE
397
+ #define CLK_UNORM_INT24 0x10DF
398
+ #if __OPENCL_C_VERSION__ >= CL_VERSION_3_0
399
+ #define CLK_UNORM_INT_101010_2 0x10E0
400
+ #endif // __OPENCL_C_VERSION__ >= CL_VERSION_3_0
401
+ #ifdef __opencl_c_ext_image_raw10_raw12
402
+ #define CLK_UNSIGNED_INT_RAW10_EXT 0x10E3
403
+ #define CLK_UNSIGNED_INT_RAW12_EXT 0x10E4
404
+ #endif // __opencl_c_ext_image_raw10_raw12
405
+ #ifdef __opencl_c_ext_image_unorm_int_2_101010
406
+ #define CLK_UNORM_INT_2_101010_EXT 0x10E5
407
+ #endif // __opencl_c_ext_image_unorm_int_2_101010
408
+ #ifdef __opencl_c_ext_image_unsigned_10x6_12x4_14x2
409
+ #define CLK_UNSIGNED_INT10X6_EXT 0x10E6
410
+ #define CLK_UNSIGNED_INT12X4_EXT 0x10E7
411
+ #define CLK_UNSIGNED_INT14X2_EXT 0x10E8
412
+ #define CLK_UNORM_10X6_EXT 0x10E1
413
+ #define CLK_UNORM_12X4_EXT 0x10E9
414
+ #define CLK_UNORM_14X2_EXT 0x10EA
415
+ #endif // __opencl_c_ext_image_unsigned_10x6_12x4_14x2
416
+
417
+ // Channel order, numbering must be aligned with cl_channel_order in cl.h
418
+ //
419
+ #define CLK_R 0x10B0
420
+ #define CLK_A 0x10B1
421
+ #define CLK_RG 0x10B2
422
+ #define CLK_RA 0x10B3
423
+ #define CLK_RGB 0x10B4
424
+ #define CLK_RGBA 0x10B5
425
+ #define CLK_BGRA 0x10B6
426
+ #define CLK_ARGB 0x10B7
427
+ #define CLK_INTENSITY 0x10B8
428
+ #define CLK_LUMINANCE 0x10B9
429
+ #define CLK_Rx 0x10BA
430
+ #define CLK_RGx 0x10BB
431
+ #define CLK_RGBx 0x10BC
432
+ #define CLK_DEPTH 0x10BD
433
+ #define CLK_DEPTH_STENCIL 0x10BE
434
+ #if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
435
+ #define CLK_sRGB 0x10BF
436
+ #define CLK_sRGBx 0x10C0
437
+ #define CLK_sRGBA 0x10C1
438
+ #define CLK_sBGRA 0x10C2
439
+ #define CLK_ABGR 0x10C3
440
+ #endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
441
+
442
+ // OpenCL v2.0 s6.13.16 - Pipe Functions
443
+ #if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
444
+ #define CLK_NULL_RESERVE_ID (__builtin_astype(((void*)(__SIZE_MAX__)), reserve_id_t))
445
+
446
+ // OpenCL v2.0 s6.13.17 - Enqueue Kernels
447
+ #define CL_COMPLETE 0x0
448
+ #define CL_RUNNING 0x1
449
+ #define CL_SUBMITTED 0x2
450
+ #define CL_QUEUED 0x3
451
+
452
+ #define CLK_SUCCESS 0
453
+ #define CLK_ENQUEUE_FAILURE -101
454
+ #define CLK_INVALID_QUEUE -102
455
+ #define CLK_INVALID_NDRANGE -160
456
+ #define CLK_INVALID_EVENT_WAIT_LIST -57
457
+ #define CLK_DEVICE_QUEUE_FULL -161
458
+ #define CLK_INVALID_ARG_SIZE -51
459
+ #define CLK_EVENT_ALLOCATION_FAILURE -100
460
+ #define CLK_OUT_OF_RESOURCES -5
461
+
462
+ #define CLK_NULL_QUEUE 0
463
+ #define CLK_NULL_EVENT (__builtin_astype(((__SIZE_MAX__)), clk_event_t))
464
+
465
+ // execution model related definitions
466
+ #define CLK_ENQUEUE_FLAGS_NO_WAIT 0x0
467
+ #define CLK_ENQUEUE_FLAGS_WAIT_KERNEL 0x1
468
+ #define CLK_ENQUEUE_FLAGS_WAIT_WORK_GROUP 0x2
469
+
470
+ typedef int kernel_enqueue_flags_t;
471
+ typedef int clk_profiling_info;
472
+
473
+ // Profiling info name (see capture_event_profiling_info)
474
+ #define CLK_PROFILING_COMMAND_EXEC_TIME 0x1
475
+
476
+ #define MAX_WORK_DIM 3
477
+
478
+ #ifdef __opencl_c_device_enqueue
479
+ typedef struct {
480
+ unsigned int workDimension;
481
+ size_t globalWorkOffset[MAX_WORK_DIM];
482
+ size_t globalWorkSize[MAX_WORK_DIM];
483
+ size_t localWorkSize[MAX_WORK_DIM];
484
+ } ndrange_t;
485
+ #endif // __opencl_c_device_enqueue
486
+
487
+ #endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
488
+
489
+ /**
490
+ * OpenCL v1.1/1.2/2.0 s6.2.4.2 - as_type operators
491
+ * Reinterprets a data type as another data type of the same size
492
+ */
493
+ #define as_char(x) __builtin_astype((x), char)
494
+ #define as_char2(x) __builtin_astype((x), char2)
495
+ #define as_char3(x) __builtin_astype((x), char3)
496
+ #define as_char4(x) __builtin_astype((x), char4)
497
+ #define as_char8(x) __builtin_astype((x), char8)
498
+ #define as_char16(x) __builtin_astype((x), char16)
499
+
500
+ #define as_uchar(x) __builtin_astype((x), uchar)
501
+ #define as_uchar2(x) __builtin_astype((x), uchar2)
502
+ #define as_uchar3(x) __builtin_astype((x), uchar3)
503
+ #define as_uchar4(x) __builtin_astype((x), uchar4)
504
+ #define as_uchar8(x) __builtin_astype((x), uchar8)
505
+ #define as_uchar16(x) __builtin_astype((x), uchar16)
506
+
507
+ #define as_short(x) __builtin_astype((x), short)
508
+ #define as_short2(x) __builtin_astype((x), short2)
509
+ #define as_short3(x) __builtin_astype((x), short3)
510
+ #define as_short4(x) __builtin_astype((x), short4)
511
+ #define as_short8(x) __builtin_astype((x), short8)
512
+ #define as_short16(x) __builtin_astype((x), short16)
513
+
514
+ #define as_ushort(x) __builtin_astype((x), ushort)
515
+ #define as_ushort2(x) __builtin_astype((x), ushort2)
516
+ #define as_ushort3(x) __builtin_astype((x), ushort3)
517
+ #define as_ushort4(x) __builtin_astype((x), ushort4)
518
+ #define as_ushort8(x) __builtin_astype((x), ushort8)
519
+ #define as_ushort16(x) __builtin_astype((x), ushort16)
520
+
521
+ #define as_int(x) __builtin_astype((x), int)
522
+ #define as_int2(x) __builtin_astype((x), int2)
523
+ #define as_int3(x) __builtin_astype((x), int3)
524
+ #define as_int4(x) __builtin_astype((x), int4)
525
+ #define as_int8(x) __builtin_astype((x), int8)
526
+ #define as_int16(x) __builtin_astype((x), int16)
527
+
528
+ #define as_uint(x) __builtin_astype((x), uint)
529
+ #define as_uint2(x) __builtin_astype((x), uint2)
530
+ #define as_uint3(x) __builtin_astype((x), uint3)
531
+ #define as_uint4(x) __builtin_astype((x), uint4)
532
+ #define as_uint8(x) __builtin_astype((x), uint8)
533
+ #define as_uint16(x) __builtin_astype((x), uint16)
534
+
535
+ #define as_long(x) __builtin_astype((x), long)
536
+ #define as_long2(x) __builtin_astype((x), long2)
537
+ #define as_long3(x) __builtin_astype((x), long3)
538
+ #define as_long4(x) __builtin_astype((x), long4)
539
+ #define as_long8(x) __builtin_astype((x), long8)
540
+ #define as_long16(x) __builtin_astype((x), long16)
541
+
542
+ #define as_ulong(x) __builtin_astype((x), ulong)
543
+ #define as_ulong2(x) __builtin_astype((x), ulong2)
544
+ #define as_ulong3(x) __builtin_astype((x), ulong3)
545
+ #define as_ulong4(x) __builtin_astype((x), ulong4)
546
+ #define as_ulong8(x) __builtin_astype((x), ulong8)
547
+ #define as_ulong16(x) __builtin_astype((x), ulong16)
548
+
549
+ #define as_float(x) __builtin_astype((x), float)
550
+ #define as_float2(x) __builtin_astype((x), float2)
551
+ #define as_float3(x) __builtin_astype((x), float3)
552
+ #define as_float4(x) __builtin_astype((x), float4)
553
+ #define as_float8(x) __builtin_astype((x), float8)
554
+ #define as_float16(x) __builtin_astype((x), float16)
555
+
556
+ #ifdef cl_khr_fp64
557
+ #define as_double(x) __builtin_astype((x), double)
558
+ #define as_double2(x) __builtin_astype((x), double2)
559
+ #define as_double3(x) __builtin_astype((x), double3)
560
+ #define as_double4(x) __builtin_astype((x), double4)
561
+ #define as_double8(x) __builtin_astype((x), double8)
562
+ #define as_double16(x) __builtin_astype((x), double16)
563
+ #endif // cl_khr_fp64
564
+
565
+ #ifdef cl_khr_fp16
566
+ #define as_half(x) __builtin_astype((x), half)
567
+ #define as_half2(x) __builtin_astype((x), half2)
568
+ #define as_half3(x) __builtin_astype((x), half3)
569
+ #define as_half4(x) __builtin_astype((x), half4)
570
+ #define as_half8(x) __builtin_astype((x), half8)
571
+ #define as_half16(x) __builtin_astype((x), half16)
572
+ #endif // cl_khr_fp16
573
+
574
+ #define as_size_t(x) __builtin_astype((x), size_t)
575
+ #define as_ptrdiff_t(x) __builtin_astype((x), ptrdiff_t)
576
+ #define as_intptr_t(x) __builtin_astype((x), intptr_t)
577
+ #define as_uintptr_t(x) __builtin_astype((x), uintptr_t)
578
+
579
+ // C++ for OpenCL - __remove_address_space
580
+ #if defined(__OPENCL_CPP_VERSION__)
581
+ template <typename _Tp> struct __remove_address_space { using type = _Tp; };
582
+ #if defined(__opencl_c_generic_address_space)
583
+ template <typename _Tp> struct __remove_address_space<__generic _Tp> {
584
+ using type = _Tp;
585
+ };
586
+ #endif
587
+ template <typename _Tp> struct __remove_address_space<__global _Tp> {
588
+ using type = _Tp;
589
+ };
590
+ template <typename _Tp> struct __remove_address_space<__private _Tp> {
591
+ using type = _Tp;
592
+ };
593
+ template <typename _Tp> struct __remove_address_space<__local _Tp> {
594
+ using type = _Tp;
595
+ };
596
+ template <typename _Tp> struct __remove_address_space<__constant _Tp> {
597
+ using type = _Tp;
598
+ };
599
+ #endif
600
+
601
+ // OpenCL v1.1 s6.9, v1.2/2.0 s6.10 - Function qualifiers
602
+
603
+ #define __kernel_exec(X, typen) __kernel \
604
+ __attribute__((work_group_size_hint(X, 1, 1))) \
605
+ __attribute__((vec_type_hint(typen)))
606
+
607
+ #define kernel_exec(X, typen) __kernel \
608
+ __attribute__((work_group_size_hint(X, 1, 1))) \
609
+ __attribute__((vec_type_hint(typen)))
610
+
611
+ #if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
612
+ // OpenCL v1.2 s6.12.13, v2.0 s6.13.13 - printf
613
+
614
+ #ifdef __OPENCL_CPP_VERSION__
615
+ #define CLINKAGE extern "C"
616
+ #else
617
+ #define CLINKAGE
618
+ #endif
619
+
620
+ CLINKAGE int printf(__constant const char *st, ...)
621
+ __attribute__((format(printf, 1, 2)));
622
+
623
+ #undef CLINKAGE
624
+ #endif
625
+
626
+ #ifdef cl_intel_device_side_avc_motion_estimation
627
+
628
+ #define CLK_AVC_ME_MAJOR_16x16_INTEL 0x0
629
+ #define CLK_AVC_ME_MAJOR_16x8_INTEL 0x1
630
+ #define CLK_AVC_ME_MAJOR_8x16_INTEL 0x2
631
+ #define CLK_AVC_ME_MAJOR_8x8_INTEL 0x3
632
+
633
+ #define CLK_AVC_ME_MINOR_8x8_INTEL 0x0
634
+ #define CLK_AVC_ME_MINOR_8x4_INTEL 0x1
635
+ #define CLK_AVC_ME_MINOR_4x8_INTEL 0x2
636
+ #define CLK_AVC_ME_MINOR_4x4_INTEL 0x3
637
+
638
+ #define CLK_AVC_ME_MAJOR_FORWARD_INTEL 0x0
639
+ #define CLK_AVC_ME_MAJOR_BACKWARD_INTEL 0x1
640
+ #define CLK_AVC_ME_MAJOR_BIDIRECTIONAL_INTEL 0x2
641
+
642
+ #define CLK_AVC_ME_PARTITION_MASK_ALL_INTEL 0x0
643
+ #define CLK_AVC_ME_PARTITION_MASK_16x16_INTEL 0x7E
644
+ #define CLK_AVC_ME_PARTITION_MASK_16x8_INTEL 0x7D
645
+ #define CLK_AVC_ME_PARTITION_MASK_8x16_INTEL 0x7B
646
+ #define CLK_AVC_ME_PARTITION_MASK_8x8_INTEL 0x77
647
+ #define CLK_AVC_ME_PARTITION_MASK_8x4_INTEL 0x6F
648
+ #define CLK_AVC_ME_PARTITION_MASK_4x8_INTEL 0x5F
649
+ #define CLK_AVC_ME_PARTITION_MASK_4x4_INTEL 0x3F
650
+
651
+ #define CLK_AVC_ME_SLICE_TYPE_PRED_INTEL 0x0
652
+ #define CLK_AVC_ME_SLICE_TYPE_BPRED_INTEL 0x1
653
+ #define CLK_AVC_ME_SLICE_TYPE_INTRA_INTEL 0x2
654
+
655
+ #define CLK_AVC_ME_SEARCH_WINDOW_EXHAUSTIVE_INTEL 0x0
656
+ #define CLK_AVC_ME_SEARCH_WINDOW_SMALL_INTEL 0x1
657
+ #define CLK_AVC_ME_SEARCH_WINDOW_TINY_INTEL 0x2
658
+ #define CLK_AVC_ME_SEARCH_WINDOW_EXTRA_TINY_INTEL 0x3
659
+ #define CLK_AVC_ME_SEARCH_WINDOW_DIAMOND_INTEL 0x4
660
+ #define CLK_AVC_ME_SEARCH_WINDOW_LARGE_DIAMOND_INTEL 0x5
661
+ #define CLK_AVC_ME_SEARCH_WINDOW_RESERVED0_INTEL 0x6
662
+ #define CLK_AVC_ME_SEARCH_WINDOW_RESERVED1_INTEL 0x7
663
+ #define CLK_AVC_ME_SEARCH_WINDOW_CUSTOM_INTEL 0x8
664
+
665
+ #define CLK_AVC_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
666
+ #define CLK_AVC_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x2
667
+
668
+ #define CLK_AVC_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
669
+ #define CLK_AVC_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
670
+ #define CLK_AVC_ME_SUBPIXEL_MODE_QPEL_INTEL 0x3
671
+
672
+ #define CLK_AVC_ME_COST_PRECISION_QPEL_INTEL 0x0
673
+ #define CLK_AVC_ME_COST_PRECISION_HPEL_INTEL 0x1
674
+ #define CLK_AVC_ME_COST_PRECISION_PEL_INTEL 0x2
675
+ #define CLK_AVC_ME_COST_PRECISION_DPEL_INTEL 0x3
676
+
677
+ #define CLK_AVC_ME_BIDIR_WEIGHT_QUARTER_INTEL 0x10
678
+ #define CLK_AVC_ME_BIDIR_WEIGHT_THIRD_INTEL 0x15
679
+ #define CLK_AVC_ME_BIDIR_WEIGHT_HALF_INTEL 0x20
680
+ #define CLK_AVC_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 0x2B
681
+ #define CLK_AVC_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 0x30
682
+
683
+ #define CLK_AVC_ME_BORDER_REACHED_LEFT_INTEL 0x0
684
+ #define CLK_AVC_ME_BORDER_REACHED_RIGHT_INTEL 0x2
685
+ #define CLK_AVC_ME_BORDER_REACHED_TOP_INTEL 0x4
686
+ #define CLK_AVC_ME_BORDER_REACHED_BOTTOM_INTEL 0x8
687
+
688
+ #define CLK_AVC_ME_INTRA_16x16_INTEL 0x0
689
+ #define CLK_AVC_ME_INTRA_8x8_INTEL 0x1
690
+ #define CLK_AVC_ME_INTRA_4x4_INTEL 0x2
691
+
692
+ #define CLK_AVC_ME_SKIP_BLOCK_PARTITION_16x16_INTEL 0x0
693
+ #define CLK_AVC_ME_SKIP_BLOCK_PARTITION_8x8_INTEL 0x4000
694
+
695
+ #define CLK_AVC_ME_SKIP_BLOCK_16x16_FORWARD_ENABLE_INTEL (0x1 << 24)
696
+ #define CLK_AVC_ME_SKIP_BLOCK_16x16_BACKWARD_ENABLE_INTEL (0x2 << 24)
697
+ #define CLK_AVC_ME_SKIP_BLOCK_16x16_DUAL_ENABLE_INTEL (0x3 << 24)
698
+ #define CLK_AVC_ME_SKIP_BLOCK_8x8_FORWARD_ENABLE_INTEL (0x55 << 24)
699
+ #define CLK_AVC_ME_SKIP_BLOCK_8x8_BACKWARD_ENABLE_INTEL (0xAA << 24)
700
+ #define CLK_AVC_ME_SKIP_BLOCK_8x8_DUAL_ENABLE_INTEL (0xFF << 24)
701
+ #define CLK_AVC_ME_SKIP_BLOCK_8x8_0_FORWARD_ENABLE_INTEL (0x1 << 24)
702
+ #define CLK_AVC_ME_SKIP_BLOCK_8x8_0_BACKWARD_ENABLE_INTEL (0x2 << 24)
703
+ #define CLK_AVC_ME_SKIP_BLOCK_8x8_1_FORWARD_ENABLE_INTEL (0x1 << 26)
704
+ #define CLK_AVC_ME_SKIP_BLOCK_8x8_1_BACKWARD_ENABLE_INTEL (0x2 << 26)
705
+ #define CLK_AVC_ME_SKIP_BLOCK_8x8_2_FORWARD_ENABLE_INTEL (0x1 << 28)
706
+ #define CLK_AVC_ME_SKIP_BLOCK_8x8_2_BACKWARD_ENABLE_INTEL (0x2 << 28)
707
+ #define CLK_AVC_ME_SKIP_BLOCK_8x8_3_FORWARD_ENABLE_INTEL (0x1 << 30)
708
+ #define CLK_AVC_ME_SKIP_BLOCK_8x8_3_BACKWARD_ENABLE_INTEL (0x2 << 30)
709
+
710
+ #define CLK_AVC_ME_BLOCK_BASED_SKIP_4x4_INTEL 0x00
711
+ #define CLK_AVC_ME_BLOCK_BASED_SKIP_8x8_INTEL 0x80
712
+
713
+ #define CLK_AVC_ME_INTRA_LUMA_PARTITION_MASK_ALL_INTEL 0x0
714
+ #define CLK_AVC_ME_INTRA_LUMA_PARTITION_MASK_16x16_INTEL 0x6
715
+ #define CLK_AVC_ME_INTRA_LUMA_PARTITION_MASK_8x8_INTEL 0x5
716
+ #define CLK_AVC_ME_INTRA_LUMA_PARTITION_MASK_4x4_INTEL 0x3
717
+
718
+ #define CLK_AVC_ME_INTRA_NEIGHBOR_LEFT_MASK_ENABLE_INTEL 0x60
719
+ #define CLK_AVC_ME_INTRA_NEIGHBOR_UPPER_MASK_ENABLE_INTEL 0x10
720
+ #define CLK_AVC_ME_INTRA_NEIGHBOR_UPPER_RIGHT_MASK_ENABLE_INTEL 0x8
721
+ #define CLK_AVC_ME_INTRA_NEIGHBOR_UPPER_LEFT_MASK_ENABLE_INTEL 0x4
722
+
723
+ #define CLK_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
724
+ #define CLK_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
725
+ #define CLK_AVC_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
726
+ #define CLK_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
727
+ #define CLK_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
728
+ #define CLK_AVC_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
729
+ #define CLK_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
730
+ #define CLK_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
731
+ #define CLK_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
732
+ #define CLK_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
733
+ #define CLK_AVC_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
734
+ #define CLK_AVC_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
735
+ #define CLK_AVC_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
736
+ #define CLK_AVC_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
737
+
738
+ #define CLK_AVC_ME_FRAME_FORWARD_INTEL 0x1
739
+ #define CLK_AVC_ME_FRAME_BACKWARD_INTEL 0x2
740
+ #define CLK_AVC_ME_FRAME_DUAL_INTEL 0x3
741
+
742
+ #define CLK_AVC_ME_INTERLACED_SCAN_TOP_FIELD_INTEL 0x0
743
+ #define CLK_AVC_ME_INTERLACED_SCAN_BOTTOM_FIELD_INTEL 0x1
744
+
745
+ #define CLK_AVC_ME_INITIALIZE_INTEL 0x0
746
+
747
+ #define CLK_AVC_IME_PAYLOAD_INITIALIZE_INTEL 0x0
748
+ #define CLK_AVC_REF_PAYLOAD_INITIALIZE_INTEL 0x0
749
+ #define CLK_AVC_SIC_PAYLOAD_INITIALIZE_INTEL 0x0
750
+
751
+ #define CLK_AVC_IME_RESULT_INITIALIZE_INTEL 0x0
752
+ #define CLK_AVC_REF_RESULT_INITIALIZE_INTEL 0x0
753
+ #define CLK_AVC_SIC_RESULT_INITIALIZE_INTEL 0x0
754
+
755
+ #define CLK_AVC_IME_RESULT_SINGLE_REFERENCE_STREAMOUT_INITIALIZE_INTEL 0x0
756
+ #define CLK_AVC_IME_RESULT_SINGLE_REFERENCE_STREAMIN_INITIALIZE_INTEL 0x0
757
+ #define CLK_AVC_IME_RESULT_DUAL_REFERENCE_STREAMOUT_INITIALIZE_INTEL 0x0
758
+ #define CLK_AVC_IME_RESULT_DUAL_REFERENCE_STREAMIN_INITIALIZE_INTEL 0x0
759
+
760
+ #endif // cl_intel_device_side_avc_motion_estimation
761
+
762
+ // Disable any extensions we may have enabled previously.
763
+ #pragma OPENCL EXTENSION all : disable
764
+
765
+ #endif //_OPENCL_BASE_H_