@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.
- package/framework/App_Resources/Linux/app.desktop +8 -0
- package/framework/App_Resources/Linux/app.metainfo.xml +15 -0
- package/framework/App_Resources/Linux/icon.png +0 -0
- package/framework/App_Resources/Linux/images/.gitkeep +0 -0
- package/framework/__PROJECT_NAME__/app/.gitkeep +0 -0
- package/framework/runtime/x64/metadata-x86_64.bin +0 -0
- package/framework/runtime/x64/ns-linux +4 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_cuda_builtin_vars.h +121 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_cuda_cmath.h +512 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_cuda_complex_builtins.h +285 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_cuda_device_functions.h +1558 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_cuda_intrinsics.h +709 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_cuda_libdevice_declares.h +468 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_cuda_math.h +348 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_cuda_math_forward_declares.h +284 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_cuda_runtime_wrapper.h +503 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_cuda_texture_intrinsics.h +742 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_hip_cmath.h +842 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_hip_libdevice_declares.h +353 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_hip_math.h +1303 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_hip_runtime_wrapper.h +151 -0
- package/framework/tools/x64/lib/clang/17/include/__clang_hip_stdlib.h +43 -0
- package/framework/tools/x64/lib/clang/17/include/__stddef_max_align_t.h +27 -0
- package/framework/tools/x64/lib/clang/17/include/__wmmintrin_aes.h +140 -0
- package/framework/tools/x64/lib/clang/17/include/__wmmintrin_pclmul.h +48 -0
- package/framework/tools/x64/lib/clang/17/include/adxintrin.h +227 -0
- package/framework/tools/x64/lib/clang/17/include/altivec.h +19342 -0
- package/framework/tools/x64/lib/clang/17/include/ammintrin.h +183 -0
- package/framework/tools/x64/lib/clang/17/include/amxcomplexintrin.h +169 -0
- package/framework/tools/x64/lib/clang/17/include/amxfp16intrin.h +58 -0
- package/framework/tools/x64/lib/clang/17/include/amxintrin.h +524 -0
- package/framework/tools/x64/lib/clang/17/include/arm64intr.h +35 -0
- package/framework/tools/x64/lib/clang/17/include/arm_acle.h +782 -0
- package/framework/tools/x64/lib/clang/17/include/arm_bf16.h +20 -0
- package/framework/tools/x64/lib/clang/17/include/arm_cde.h +410 -0
- package/framework/tools/x64/lib/clang/17/include/arm_cmse.h +217 -0
- package/framework/tools/x64/lib/clang/17/include/arm_fp16.h +596 -0
- package/framework/tools/x64/lib/clang/17/include/arm_mve.h +19187 -0
- package/framework/tools/x64/lib/clang/17/include/arm_neon.h +69885 -0
- package/framework/tools/x64/lib/clang/17/include/arm_neon_sve_bridge.h +182 -0
- package/framework/tools/x64/lib/clang/17/include/arm_sme_draft_spec_subject_to_change.h +642 -0
- package/framework/tools/x64/lib/clang/17/include/arm_sve.h +23950 -0
- package/framework/tools/x64/lib/clang/17/include/armintr.h +31 -0
- package/framework/tools/x64/lib/clang/17/include/avx2intrin.h +5263 -0
- package/framework/tools/x64/lib/clang/17/include/avx512bf16intrin.h +282 -0
- package/framework/tools/x64/lib/clang/17/include/avx512bitalgintrin.h +83 -0
- package/framework/tools/x64/lib/clang/17/include/avx512bwintrin.h +2024 -0
- package/framework/tools/x64/lib/clang/17/include/avx512cdintrin.h +123 -0
- package/framework/tools/x64/lib/clang/17/include/avx512dqintrin.h +1377 -0
- package/framework/tools/x64/lib/clang/17/include/avx512erintrin.h +271 -0
- package/framework/tools/x64/lib/clang/17/include/avx512fintrin.h +9775 -0
- package/framework/tools/x64/lib/clang/17/include/avx512fp16intrin.h +3350 -0
- package/framework/tools/x64/lib/clang/17/include/avx512ifmaintrin.h +68 -0
- package/framework/tools/x64/lib/clang/17/include/avx512ifmavlintrin.h +105 -0
- package/framework/tools/x64/lib/clang/17/include/avx512pfintrin.h +97 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vbmi2intrin.h +357 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vbmiintrin.h +105 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vbmivlintrin.h +188 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vlbf16intrin.h +515 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vlbitalgintrin.h +145 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vlbwintrin.h +3161 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vlcdintrin.h +225 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vldqintrin.h +1167 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vlfp16intrin.h +2071 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vlintrin.h +8431 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vlvbmi2intrin.h +689 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vlvnniintrin.h +304 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vlvp2intersectintrin.h +121 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vnniintrin.h +115 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vp2intersectintrin.h +77 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vpopcntdqintrin.h +54 -0
- package/framework/tools/x64/lib/clang/17/include/avx512vpopcntdqvlintrin.h +91 -0
- package/framework/tools/x64/lib/clang/17/include/avxifmaintrin.h +177 -0
- package/framework/tools/x64/lib/clang/17/include/avxintrin.h +5108 -0
- package/framework/tools/x64/lib/clang/17/include/avxneconvertintrin.h +484 -0
- package/framework/tools/x64/lib/clang/17/include/avxvnniint16intrin.h +473 -0
- package/framework/tools/x64/lib/clang/17/include/avxvnniint8intrin.h +471 -0
- package/framework/tools/x64/lib/clang/17/include/avxvnniintrin.h +225 -0
- package/framework/tools/x64/lib/clang/17/include/bmi2intrin.h +255 -0
- package/framework/tools/x64/lib/clang/17/include/bmiintrin.h +431 -0
- package/framework/tools/x64/lib/clang/17/include/builtins.h +16 -0
- package/framework/tools/x64/lib/clang/17/include/cet.h +66 -0
- package/framework/tools/x64/lib/clang/17/include/cetintrin.h +115 -0
- package/framework/tools/x64/lib/clang/17/include/cldemoteintrin.h +36 -0
- package/framework/tools/x64/lib/clang/17/include/clflushoptintrin.h +36 -0
- package/framework/tools/x64/lib/clang/17/include/clwbintrin.h +38 -0
- package/framework/tools/x64/lib/clang/17/include/clzerointrin.h +38 -0
- package/framework/tools/x64/lib/clang/17/include/cmpccxaddintrin.h +70 -0
- package/framework/tools/x64/lib/clang/17/include/cpuid.h +331 -0
- package/framework/tools/x64/lib/clang/17/include/crc32intrin.h +100 -0
- package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/algorithm +116 -0
- package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/bits/basic_string.h +9 -0
- package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/bits/basic_string.tcc +9 -0
- package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
- package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/cmath +90 -0
- package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/complex +90 -0
- package/framework/tools/x64/lib/clang/17/include/cuda_wrappers/new +106 -0
- package/framework/tools/x64/lib/clang/17/include/emmintrin.h +4775 -0
- package/framework/tools/x64/lib/clang/17/include/enqcmdintrin.h +63 -0
- package/framework/tools/x64/lib/clang/17/include/f16cintrin.h +162 -0
- package/framework/tools/x64/lib/clang/17/include/float.h +168 -0
- package/framework/tools/x64/lib/clang/17/include/fma4intrin.h +218 -0
- package/framework/tools/x64/lib/clang/17/include/fmaintrin.h +780 -0
- package/framework/tools/x64/lib/clang/17/include/fxsrintrin.h +91 -0
- package/framework/tools/x64/lib/clang/17/include/gfniintrin.h +194 -0
- package/framework/tools/x64/lib/clang/17/include/hexagon_circ_brev_intrinsics.h +298 -0
- package/framework/tools/x64/lib/clang/17/include/hexagon_protos.h +8439 -0
- package/framework/tools/x64/lib/clang/17/include/hexagon_types.h +2621 -0
- package/framework/tools/x64/lib/clang/17/include/hresetintrin.h +49 -0
- package/framework/tools/x64/lib/clang/17/include/htmintrin.h +212 -0
- package/framework/tools/x64/lib/clang/17/include/htmxlintrin.h +345 -0
- package/framework/tools/x64/lib/clang/17/include/hvx_hexagon_protos.h +5183 -0
- package/framework/tools/x64/lib/clang/17/include/ia32intrin.h +441 -0
- package/framework/tools/x64/lib/clang/17/include/immintrin.h +758 -0
- package/framework/tools/x64/lib/clang/17/include/intrin.h +620 -0
- package/framework/tools/x64/lib/clang/17/include/inttypes.h +97 -0
- package/framework/tools/x64/lib/clang/17/include/invpcidintrin.h +23 -0
- package/framework/tools/x64/lib/clang/17/include/iso646.h +27 -0
- package/framework/tools/x64/lib/clang/17/include/keylockerintrin.h +530 -0
- package/framework/tools/x64/lib/clang/17/include/larchintrin.h +234 -0
- package/framework/tools/x64/lib/clang/17/include/limits.h +127 -0
- package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/ctype.h +85 -0
- package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/inttypes.h +34 -0
- package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/stdio.h +34 -0
- package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/stdlib.h +42 -0
- package/framework/tools/x64/lib/clang/17/include/llvm_libc_wrappers/string.h +37 -0
- package/framework/tools/x64/lib/clang/17/include/lwpintrin.h +136 -0
- package/framework/tools/x64/lib/clang/17/include/lzcntintrin.h +104 -0
- package/framework/tools/x64/lib/clang/17/include/mm3dnow.h +157 -0
- package/framework/tools/x64/lib/clang/17/include/mm_malloc.h +67 -0
- package/framework/tools/x64/lib/clang/17/include/mmintrin.h +1562 -0
- package/framework/tools/x64/lib/clang/17/include/module.modulemap +164 -0
- package/framework/tools/x64/lib/clang/17/include/movdirintrin.h +49 -0
- package/framework/tools/x64/lib/clang/17/include/msa.h +573 -0
- package/framework/tools/x64/lib/clang/17/include/mwaitxintrin.h +62 -0
- package/framework/tools/x64/lib/clang/17/include/nmmintrin.h +20 -0
- package/framework/tools/x64/lib/clang/17/include/opencl-c-base.h +820 -0
- package/framework/tools/x64/lib/clang/17/include/opencl-c.h +18356 -0
- package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/__clang_openmp_device_functions.h +105 -0
- package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/cmath +132 -0
- package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/complex +55 -0
- package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/complex.h +35 -0
- package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/complex_cmath.h +388 -0
- package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/math.h +61 -0
- package/framework/tools/x64/lib/clang/17/include/openmp_wrappers/new +48 -0
- package/framework/tools/x64/lib/clang/17/include/pconfigintrin.h +40 -0
- package/framework/tools/x64/lib/clang/17/include/pkuintrin.h +34 -0
- package/framework/tools/x64/lib/clang/17/include/pmmintrin.h +300 -0
- package/framework/tools/x64/lib/clang/17/include/popcntintrin.h +59 -0
- package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/bmi2intrin.h +134 -0
- package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/bmiintrin.h +165 -0
- package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/emmintrin.h +2269 -0
- package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/immintrin.h +27 -0
- package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/mm_malloc.h +45 -0
- package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/mmintrin.h +1453 -0
- package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/pmmintrin.h +145 -0
- package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/smmintrin.h +663 -0
- package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/tmmintrin.h +453 -0
- package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/x86gprintrin.h +17 -0
- package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/x86intrin.h +28 -0
- package/framework/tools/x64/lib/clang/17/include/ppc_wrappers/xmmintrin.h +1827 -0
- package/framework/tools/x64/lib/clang/17/include/prfchiintrin.h +61 -0
- package/framework/tools/x64/lib/clang/17/include/prfchwintrin.h +58 -0
- package/framework/tools/x64/lib/clang/17/include/ptwriteintrin.h +37 -0
- package/framework/tools/x64/lib/clang/17/include/raointintrin.h +203 -0
- package/framework/tools/x64/lib/clang/17/include/rdpruintrin.h +57 -0
- package/framework/tools/x64/lib/clang/17/include/rdseedintrin.h +105 -0
- package/framework/tools/x64/lib/clang/17/include/riscv_ntlh.h +28 -0
- package/framework/tools/x64/lib/clang/17/include/rtmintrin.h +45 -0
- package/framework/tools/x64/lib/clang/17/include/s390intrin.h +25 -0
- package/framework/tools/x64/lib/clang/17/include/serializeintrin.h +30 -0
- package/framework/tools/x64/lib/clang/17/include/sgxintrin.h +60 -0
- package/framework/tools/x64/lib/clang/17/include/sha512intrin.h +200 -0
- package/framework/tools/x64/lib/clang/17/include/shaintrin.h +189 -0
- package/framework/tools/x64/lib/clang/17/include/sifive_vector.h +16 -0
- package/framework/tools/x64/lib/clang/17/include/sm3intrin.h +238 -0
- package/framework/tools/x64/lib/clang/17/include/sm4intrin.h +269 -0
- package/framework/tools/x64/lib/clang/17/include/smmintrin.h +2328 -0
- package/framework/tools/x64/lib/clang/17/include/stdalign.h +26 -0
- package/framework/tools/x64/lib/clang/17/include/stdarg.h +51 -0
- package/framework/tools/x64/lib/clang/17/include/stdatomic.h +196 -0
- package/framework/tools/x64/lib/clang/17/include/stdbool.h +34 -0
- package/framework/tools/x64/lib/clang/17/include/stddef.h +133 -0
- package/framework/tools/x64/lib/clang/17/include/stdint.h +979 -0
- package/framework/tools/x64/lib/clang/17/include/stdnoreturn.h +29 -0
- package/framework/tools/x64/lib/clang/17/include/tbmintrin.h +140 -0
- package/framework/tools/x64/lib/clang/17/include/tgmath.h +1368 -0
- package/framework/tools/x64/lib/clang/17/include/tmmintrin.h +775 -0
- package/framework/tools/x64/lib/clang/17/include/tsxldtrkintrin.h +56 -0
- package/framework/tools/x64/lib/clang/17/include/uintrintrin.h +157 -0
- package/framework/tools/x64/lib/clang/17/include/unwind.h +332 -0
- package/framework/tools/x64/lib/clang/17/include/vadefs.h +51 -0
- package/framework/tools/x64/lib/clang/17/include/vaesintrin.h +85 -0
- package/framework/tools/x64/lib/clang/17/include/varargs.h +12 -0
- package/framework/tools/x64/lib/clang/17/include/vecintrin.h +11127 -0
- package/framework/tools/x64/lib/clang/17/include/velintrin.h +71 -0
- package/framework/tools/x64/lib/clang/17/include/velintrin_approx.h +120 -0
- package/framework/tools/x64/lib/clang/17/include/velintrin_gen.h +1257 -0
- package/framework/tools/x64/lib/clang/17/include/vpclmulqdqintrin.h +30 -0
- package/framework/tools/x64/lib/clang/17/include/waitpkgintrin.h +42 -0
- package/framework/tools/x64/lib/clang/17/include/wasm_simd128.h +1997 -0
- package/framework/tools/x64/lib/clang/17/include/wbnoinvdintrin.h +24 -0
- package/framework/tools/x64/lib/clang/17/include/wmmintrin.h +23 -0
- package/framework/tools/x64/lib/clang/17/include/x86gprintrin.h +65 -0
- package/framework/tools/x64/lib/clang/17/include/x86intrin.h +67 -0
- package/framework/tools/x64/lib/clang/17/include/xmmintrin.h +3017 -0
- package/framework/tools/x64/lib/clang/17/include/xopintrin.h +770 -0
- package/framework/tools/x64/lib/clang/17/include/xsavecintrin.h +84 -0
- package/framework/tools/x64/lib/clang/17/include/xsaveintrin.h +63 -0
- package/framework/tools/x64/lib/clang/17/include/xsaveoptintrin.h +34 -0
- package/framework/tools/x64/lib/clang/17/include/xsavesintrin.h +44 -0
- package/framework/tools/x64/lib/clang/17/include/xtestintrin.h +27 -0
- package/framework/tools/x64/metadata-generator +4 -0
- package/framework/tools/x64/ns-bundle +0 -0
- package/framework/tools/x64/ns-metadata-filter +0 -0
- package/framework/typings/c!EGL.d.ts +431 -0
- package/framework/typings/c!GLES.d.ts +5002 -0
- package/framework/typings/c!GLib.d.ts +14488 -0
- package/framework/typings/c!Gtk.d.ts +17630 -0
- package/framework/typings/c!X11.d.ts +7054 -0
- package/framework/typings/c!_Builtin_intrinsics.d.ts +106 -0
- package/framework/typings/c!_Builtin_stddef_max_align_t.d.ts +6 -0
- package/framework/typings/c!cairo.d.ts +1248 -0
- package/framework/typings/c!fontconfig.d.ts +819 -0
- package/framework/typings/c!freetype.d.ts +1068 -0
- package/framework/typings/c!gdk_pixbuf.d.ts +326 -0
- package/framework/typings/c!graphene.d.ts +320 -0
- package/framework/typings/c!harfbuzz.d.ts +1292 -0
- package/framework/typings/c!icu.d.ts +3330 -0
- package/framework/typings/c!libc.d.ts +11639 -0
- package/framework/typings/c!libxml2.d.ts +7029 -0
- package/framework/typings/c!pango.d.ts +2225 -0
- package/framework/typings/c!uuid.d.ts +68 -0
- package/framework/typings/c!zlib.d.ts +276 -0
- package/framework/typings/index.d.ts +10 -0
- package/framework/typings/linux-runtime.d.ts +90 -0
- package/package.json +9 -4
- package/README.md +0 -3
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/*===---- __clang_hip_runtime_wrapper.h - HIP runtime support ---------------===
|
|
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
|
+
/*
|
|
11
|
+
* WARNING: This header is intended to be directly -include'd by
|
|
12
|
+
* the compiler and is not supposed to be included by users.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
#ifndef __CLANG_HIP_RUNTIME_WRAPPER_H__
|
|
17
|
+
#define __CLANG_HIP_RUNTIME_WRAPPER_H__
|
|
18
|
+
|
|
19
|
+
#if __HIP__
|
|
20
|
+
|
|
21
|
+
#define __host__ __attribute__((host))
|
|
22
|
+
#define __device__ __attribute__((device))
|
|
23
|
+
#define __global__ __attribute__((global))
|
|
24
|
+
#define __shared__ __attribute__((shared))
|
|
25
|
+
#define __constant__ __attribute__((constant))
|
|
26
|
+
#define __managed__ __attribute__((managed))
|
|
27
|
+
|
|
28
|
+
#if !defined(__cplusplus) || __cplusplus < 201103L
|
|
29
|
+
#define nullptr NULL;
|
|
30
|
+
#endif
|
|
31
|
+
|
|
32
|
+
#ifdef __cplusplus
|
|
33
|
+
extern "C" {
|
|
34
|
+
__attribute__((__visibility__("default")))
|
|
35
|
+
__attribute__((weak))
|
|
36
|
+
__attribute__((noreturn))
|
|
37
|
+
__device__ void __cxa_pure_virtual(void) {
|
|
38
|
+
__builtin_trap();
|
|
39
|
+
}
|
|
40
|
+
__attribute__((__visibility__("default")))
|
|
41
|
+
__attribute__((weak))
|
|
42
|
+
__attribute__((noreturn))
|
|
43
|
+
__device__ void __cxa_deleted_virtual(void) {
|
|
44
|
+
__builtin_trap();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
#endif //__cplusplus
|
|
48
|
+
|
|
49
|
+
#if !defined(__HIPCC_RTC__)
|
|
50
|
+
#include <cmath>
|
|
51
|
+
#include <cstdlib>
|
|
52
|
+
#include <stdlib.h>
|
|
53
|
+
#if __has_include("hip/hip_version.h")
|
|
54
|
+
#include "hip/hip_version.h"
|
|
55
|
+
#endif // __has_include("hip/hip_version.h")
|
|
56
|
+
#else
|
|
57
|
+
typedef __SIZE_TYPE__ size_t;
|
|
58
|
+
// Define macros which are needed to declare HIP device API's without standard
|
|
59
|
+
// C/C++ headers. This is for readability so that these API's can be written
|
|
60
|
+
// the same way as non-hipRTC use case. These macros need to be popped so that
|
|
61
|
+
// they do not pollute users' name space.
|
|
62
|
+
#pragma push_macro("NULL")
|
|
63
|
+
#pragma push_macro("uint32_t")
|
|
64
|
+
#pragma push_macro("uint64_t")
|
|
65
|
+
#pragma push_macro("CHAR_BIT")
|
|
66
|
+
#pragma push_macro("INT_MAX")
|
|
67
|
+
#define NULL (void *)0
|
|
68
|
+
#define uint32_t __UINT32_TYPE__
|
|
69
|
+
#define uint64_t __UINT64_TYPE__
|
|
70
|
+
#define CHAR_BIT __CHAR_BIT__
|
|
71
|
+
#define INT_MAX __INTMAX_MAX__
|
|
72
|
+
#endif // __HIPCC_RTC__
|
|
73
|
+
|
|
74
|
+
typedef __SIZE_TYPE__ __hip_size_t;
|
|
75
|
+
|
|
76
|
+
#ifdef __cplusplus
|
|
77
|
+
extern "C" {
|
|
78
|
+
#endif //__cplusplus
|
|
79
|
+
|
|
80
|
+
#if HIP_VERSION_MAJOR * 100 + HIP_VERSION_MINOR >= 405
|
|
81
|
+
extern "C" __device__ unsigned long long __ockl_dm_alloc(unsigned long long __size);
|
|
82
|
+
extern "C" __device__ void __ockl_dm_dealloc(unsigned long long __addr);
|
|
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
|
|
95
|
+
__attribute__((weak)) inline __device__ void *malloc(__hip_size_t __size) {
|
|
96
|
+
return (void *) __ockl_dm_alloc(__size);
|
|
97
|
+
}
|
|
98
|
+
__attribute__((weak)) inline __device__ void free(void *__ptr) {
|
|
99
|
+
__ockl_dm_dealloc((unsigned long long)__ptr);
|
|
100
|
+
}
|
|
101
|
+
#endif // __has_feature(address_sanitizer)
|
|
102
|
+
#else // HIP version check
|
|
103
|
+
#if __HIP_ENABLE_DEVICE_MALLOC__
|
|
104
|
+
__device__ void *__hip_malloc(__hip_size_t __size);
|
|
105
|
+
__device__ void *__hip_free(void *__ptr);
|
|
106
|
+
__attribute__((weak)) inline __device__ void *malloc(__hip_size_t __size) {
|
|
107
|
+
return __hip_malloc(__size);
|
|
108
|
+
}
|
|
109
|
+
__attribute__((weak)) inline __device__ void free(void *__ptr) {
|
|
110
|
+
__hip_free(__ptr);
|
|
111
|
+
}
|
|
112
|
+
#else
|
|
113
|
+
__attribute__((weak)) inline __device__ void *malloc(__hip_size_t __size) {
|
|
114
|
+
__builtin_trap();
|
|
115
|
+
return (void *)0;
|
|
116
|
+
}
|
|
117
|
+
__attribute__((weak)) inline __device__ void free(void *__ptr) {
|
|
118
|
+
__builtin_trap();
|
|
119
|
+
}
|
|
120
|
+
#endif
|
|
121
|
+
#endif // HIP version check
|
|
122
|
+
|
|
123
|
+
#ifdef __cplusplus
|
|
124
|
+
} // extern "C"
|
|
125
|
+
#endif //__cplusplus
|
|
126
|
+
|
|
127
|
+
#include <__clang_hip_libdevice_declares.h>
|
|
128
|
+
#include <__clang_hip_math.h>
|
|
129
|
+
#include <__clang_hip_stdlib.h>
|
|
130
|
+
|
|
131
|
+
#if defined(__HIPCC_RTC__)
|
|
132
|
+
#include <__clang_hip_cmath.h>
|
|
133
|
+
#else
|
|
134
|
+
#include <__clang_cuda_math_forward_declares.h>
|
|
135
|
+
#include <__clang_hip_cmath.h>
|
|
136
|
+
#include <__clang_cuda_complex_builtins.h>
|
|
137
|
+
#include <algorithm>
|
|
138
|
+
#include <complex>
|
|
139
|
+
#include <new>
|
|
140
|
+
#endif // __HIPCC_RTC__
|
|
141
|
+
|
|
142
|
+
#define __CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__ 1
|
|
143
|
+
#if defined(__HIPCC_RTC__)
|
|
144
|
+
#pragma pop_macro("NULL")
|
|
145
|
+
#pragma pop_macro("uint32_t")
|
|
146
|
+
#pragma pop_macro("uint64_t")
|
|
147
|
+
#pragma pop_macro("CHAR_BIT")
|
|
148
|
+
#pragma pop_macro("INT_MAX")
|
|
149
|
+
#endif // __HIPCC_RTC__
|
|
150
|
+
#endif // __HIP__
|
|
151
|
+
#endif // __CLANG_HIP_RUNTIME_WRAPPER_H__
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*===---- __clang_hip_stdlib.h - Device-side HIP math support --------------===
|
|
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 __CLANG_HIP_STDLIB_H__
|
|
10
|
+
|
|
11
|
+
#if !defined(__HIP__) && !defined(__OPENMP_AMDGCN__)
|
|
12
|
+
#error "This file is for HIP and OpenMP AMDGCN device compilation only."
|
|
13
|
+
#endif
|
|
14
|
+
|
|
15
|
+
#if !defined(__cplusplus)
|
|
16
|
+
|
|
17
|
+
#include <limits.h>
|
|
18
|
+
|
|
19
|
+
#ifdef __OPENMP_AMDGCN__
|
|
20
|
+
#define __DEVICE__ static inline __attribute__((always_inline, nothrow))
|
|
21
|
+
#else
|
|
22
|
+
#define __DEVICE__ static __device__ inline __attribute__((always_inline))
|
|
23
|
+
#endif
|
|
24
|
+
|
|
25
|
+
__DEVICE__
|
|
26
|
+
int abs(int __x) {
|
|
27
|
+
int __sgn = __x >> (sizeof(int) * CHAR_BIT - 1);
|
|
28
|
+
return (__x ^ __sgn) - __sgn;
|
|
29
|
+
}
|
|
30
|
+
__DEVICE__
|
|
31
|
+
long labs(long __x) {
|
|
32
|
+
long __sgn = __x >> (sizeof(long) * CHAR_BIT - 1);
|
|
33
|
+
return (__x ^ __sgn) - __sgn;
|
|
34
|
+
}
|
|
35
|
+
__DEVICE__
|
|
36
|
+
long long llabs(long long __x) {
|
|
37
|
+
long long __sgn = __x >> (sizeof(long long) * CHAR_BIT - 1);
|
|
38
|
+
return (__x ^ __sgn) - __sgn;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
#endif // !defined(__cplusplus)
|
|
42
|
+
|
|
43
|
+
#endif // #define __CLANG_HIP_STDLIB_H__
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---===
|
|
2
|
+
*
|
|
3
|
+
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
4
|
+
* See https://llvm.org/LICENSE.txt for license information.
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
6
|
+
*
|
|
7
|
+
*===-----------------------------------------------------------------------===
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#ifndef __CLANG_MAX_ALIGN_T_DEFINED
|
|
11
|
+
#define __CLANG_MAX_ALIGN_T_DEFINED
|
|
12
|
+
|
|
13
|
+
#if defined(_MSC_VER)
|
|
14
|
+
typedef double max_align_t;
|
|
15
|
+
#elif defined(__APPLE__)
|
|
16
|
+
typedef long double max_align_t;
|
|
17
|
+
#else
|
|
18
|
+
// Define 'max_align_t' to match the GCC definition.
|
|
19
|
+
typedef struct {
|
|
20
|
+
long long __clang_max_align_nonce1
|
|
21
|
+
__attribute__((__aligned__(__alignof__(long long))));
|
|
22
|
+
long double __clang_max_align_nonce2
|
|
23
|
+
__attribute__((__aligned__(__alignof__(long double))));
|
|
24
|
+
} max_align_t;
|
|
25
|
+
#endif
|
|
26
|
+
|
|
27
|
+
#endif
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/*===---- __wmmintrin_aes.h - AES 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 __WMMINTRIN_H
|
|
11
|
+
#error "Never use <__wmmintrin_aes.h> directly; include <wmmintrin.h> instead."
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
#ifndef __WMMINTRIN_AES_H
|
|
15
|
+
#define __WMMINTRIN_AES_H
|
|
16
|
+
|
|
17
|
+
/* Define the default attributes for the functions in this file. */
|
|
18
|
+
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("aes"), __min_vector_width__(128)))
|
|
19
|
+
|
|
20
|
+
/// Performs a single round of AES encryption using the Equivalent
|
|
21
|
+
/// Inverse Cipher, transforming the state value from the first source
|
|
22
|
+
/// operand using a 128-bit round key value contained in the second source
|
|
23
|
+
/// operand, and writes the result to the destination.
|
|
24
|
+
///
|
|
25
|
+
/// \headerfile <x86intrin.h>
|
|
26
|
+
///
|
|
27
|
+
/// This intrinsic corresponds to the <c> VAESENC </c> instruction.
|
|
28
|
+
///
|
|
29
|
+
/// \param __V
|
|
30
|
+
/// A 128-bit integer vector containing the state value.
|
|
31
|
+
/// \param __R
|
|
32
|
+
/// A 128-bit integer vector containing the round key value.
|
|
33
|
+
/// \returns A 128-bit integer vector containing the encrypted value.
|
|
34
|
+
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
|
35
|
+
_mm_aesenc_si128(__m128i __V, __m128i __R)
|
|
36
|
+
{
|
|
37
|
+
return (__m128i)__builtin_ia32_aesenc128((__v2di)__V, (__v2di)__R);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/// Performs the final round of AES encryption using the Equivalent
|
|
41
|
+
/// Inverse Cipher, transforming the state value from the first source
|
|
42
|
+
/// operand using a 128-bit round key value contained in the second source
|
|
43
|
+
/// operand, and writes the result to the destination.
|
|
44
|
+
///
|
|
45
|
+
/// \headerfile <x86intrin.h>
|
|
46
|
+
///
|
|
47
|
+
/// This intrinsic corresponds to the <c> VAESENCLAST </c> instruction.
|
|
48
|
+
///
|
|
49
|
+
/// \param __V
|
|
50
|
+
/// A 128-bit integer vector containing the state value.
|
|
51
|
+
/// \param __R
|
|
52
|
+
/// A 128-bit integer vector containing the round key value.
|
|
53
|
+
/// \returns A 128-bit integer vector containing the encrypted value.
|
|
54
|
+
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
|
55
|
+
_mm_aesenclast_si128(__m128i __V, __m128i __R)
|
|
56
|
+
{
|
|
57
|
+
return (__m128i)__builtin_ia32_aesenclast128((__v2di)__V, (__v2di)__R);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/// Performs a single round of AES decryption using the Equivalent
|
|
61
|
+
/// Inverse Cipher, transforming the state value from the first source
|
|
62
|
+
/// operand using a 128-bit round key value contained in the second source
|
|
63
|
+
/// operand, and writes the result to the destination.
|
|
64
|
+
///
|
|
65
|
+
/// \headerfile <x86intrin.h>
|
|
66
|
+
///
|
|
67
|
+
/// This intrinsic corresponds to the <c> VAESDEC </c> instruction.
|
|
68
|
+
///
|
|
69
|
+
/// \param __V
|
|
70
|
+
/// A 128-bit integer vector containing the state value.
|
|
71
|
+
/// \param __R
|
|
72
|
+
/// A 128-bit integer vector containing the round key value.
|
|
73
|
+
/// \returns A 128-bit integer vector containing the decrypted value.
|
|
74
|
+
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
|
75
|
+
_mm_aesdec_si128(__m128i __V, __m128i __R)
|
|
76
|
+
{
|
|
77
|
+
return (__m128i)__builtin_ia32_aesdec128((__v2di)__V, (__v2di)__R);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/// Performs the final round of AES decryption using the Equivalent
|
|
81
|
+
/// Inverse Cipher, transforming the state value from the first source
|
|
82
|
+
/// operand using a 128-bit round key value contained in the second source
|
|
83
|
+
/// operand, and writes the result to the destination.
|
|
84
|
+
///
|
|
85
|
+
/// \headerfile <x86intrin.h>
|
|
86
|
+
///
|
|
87
|
+
/// This intrinsic corresponds to the <c> VAESDECLAST </c> instruction.
|
|
88
|
+
///
|
|
89
|
+
/// \param __V
|
|
90
|
+
/// A 128-bit integer vector containing the state value.
|
|
91
|
+
/// \param __R
|
|
92
|
+
/// A 128-bit integer vector containing the round key value.
|
|
93
|
+
/// \returns A 128-bit integer vector containing the decrypted value.
|
|
94
|
+
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
|
95
|
+
_mm_aesdeclast_si128(__m128i __V, __m128i __R)
|
|
96
|
+
{
|
|
97
|
+
return (__m128i)__builtin_ia32_aesdeclast128((__v2di)__V, (__v2di)__R);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/// Applies the AES InvMixColumns() transformation to an expanded key
|
|
101
|
+
/// contained in the source operand, and writes the result to the
|
|
102
|
+
/// destination.
|
|
103
|
+
///
|
|
104
|
+
/// \headerfile <x86intrin.h>
|
|
105
|
+
///
|
|
106
|
+
/// This intrinsic corresponds to the <c> VAESIMC </c> instruction.
|
|
107
|
+
///
|
|
108
|
+
/// \param __V
|
|
109
|
+
/// A 128-bit integer vector containing the expanded key.
|
|
110
|
+
/// \returns A 128-bit integer vector containing the transformed value.
|
|
111
|
+
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
|
112
|
+
_mm_aesimc_si128(__m128i __V)
|
|
113
|
+
{
|
|
114
|
+
return (__m128i)__builtin_ia32_aesimc128((__v2di)__V);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/// Generates a round key for AES encryption, operating on 128-bit data
|
|
118
|
+
/// specified in the first source operand and using an 8-bit round constant
|
|
119
|
+
/// specified by the second source operand, and writes the result to the
|
|
120
|
+
/// destination.
|
|
121
|
+
///
|
|
122
|
+
/// \headerfile <x86intrin.h>
|
|
123
|
+
///
|
|
124
|
+
/// \code
|
|
125
|
+
/// __m128i _mm_aeskeygenassist_si128(__m128i C, const int R);
|
|
126
|
+
/// \endcode
|
|
127
|
+
///
|
|
128
|
+
/// This intrinsic corresponds to the <c> AESKEYGENASSIST </c> instruction.
|
|
129
|
+
///
|
|
130
|
+
/// \param C
|
|
131
|
+
/// A 128-bit integer vector that is used to generate the AES encryption key.
|
|
132
|
+
/// \param R
|
|
133
|
+
/// An 8-bit round constant used to generate the AES encryption key.
|
|
134
|
+
/// \returns A 128-bit round key for AES encryption.
|
|
135
|
+
#define _mm_aeskeygenassist_si128(C, R) \
|
|
136
|
+
((__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R)))
|
|
137
|
+
|
|
138
|
+
#undef __DEFAULT_FN_ATTRS
|
|
139
|
+
|
|
140
|
+
#endif /* __WMMINTRIN_AES_H */
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*===---- __wmmintrin_pclmul.h - PCMUL 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 __WMMINTRIN_H
|
|
11
|
+
#error "Never use <__wmmintrin_pclmul.h> directly; include <wmmintrin.h> instead."
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
#ifndef __WMMINTRIN_PCLMUL_H
|
|
15
|
+
#define __WMMINTRIN_PCLMUL_H
|
|
16
|
+
|
|
17
|
+
/// Multiplies two 64-bit integer values, which are selected from source
|
|
18
|
+
/// operands using the immediate-value operand. The multiplication is a
|
|
19
|
+
/// carry-less multiplication, and the 128-bit integer product is stored in
|
|
20
|
+
/// the destination.
|
|
21
|
+
///
|
|
22
|
+
/// \headerfile <x86intrin.h>
|
|
23
|
+
///
|
|
24
|
+
/// \code
|
|
25
|
+
/// __m128i _mm_clmulepi64_si128(__m128i X, __m128i Y, const int I);
|
|
26
|
+
/// \endcode
|
|
27
|
+
///
|
|
28
|
+
/// This intrinsic corresponds to the <c> VPCLMULQDQ </c> instruction.
|
|
29
|
+
///
|
|
30
|
+
/// \param X
|
|
31
|
+
/// A 128-bit vector of [2 x i64] containing one of the source operands.
|
|
32
|
+
/// \param Y
|
|
33
|
+
/// A 128-bit vector of [2 x i64] containing one of the source operands.
|
|
34
|
+
/// \param I
|
|
35
|
+
/// An immediate value specifying which 64-bit values to select from the
|
|
36
|
+
/// operands. Bit 0 is used to select a value from operand \a X, and bit
|
|
37
|
+
/// 4 is used to select a value from operand \a Y: \n
|
|
38
|
+
/// Bit[0]=0 indicates that bits[63:0] of operand \a X are used. \n
|
|
39
|
+
/// Bit[0]=1 indicates that bits[127:64] of operand \a X are used. \n
|
|
40
|
+
/// Bit[4]=0 indicates that bits[63:0] of operand \a Y are used. \n
|
|
41
|
+
/// Bit[4]=1 indicates that bits[127:64] of operand \a Y are used.
|
|
42
|
+
/// \returns The 128-bit integer vector containing the result of the carry-less
|
|
43
|
+
/// multiplication of the selected 64-bit values.
|
|
44
|
+
#define _mm_clmulepi64_si128(X, Y, I) \
|
|
45
|
+
((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(X), \
|
|
46
|
+
(__v2di)(__m128i)(Y), (char)(I)))
|
|
47
|
+
|
|
48
|
+
#endif /* __WMMINTRIN_PCLMUL_H */
|
|
@@ -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 */
|