@cpp-linter/clang-tidy-linux-arm64 18.1.5 → 20.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.
- package/README.md +2 -2
- package/bin/clang-tidy +2 -2
- package/lib/clang/{18 → 20}/include/__clang_cuda_device_functions.h +14 -0
- package/lib/clang/{18 → 20}/include/__clang_cuda_intrinsics.h +1 -3
- package/lib/clang/{18 → 20}/include/__clang_cuda_math.h +5 -0
- package/lib/clang/{18 → 20}/include/__clang_hip_cmath.h +6 -1
- package/lib/clang/{18 → 20}/include/__clang_hip_math.h +5 -0
- package/lib/clang/20/include/__stdarg_header_macro.h +12 -0
- package/lib/clang/20/include/__stddef_header_macro.h +12 -0
- package/lib/clang/{18 → 20}/include/adcintrin.h +5 -0
- package/lib/clang/{18 → 20}/include/adxintrin.h +5 -0
- package/lib/clang/{18 → 20}/include/altivec.h +8 -8
- package/lib/clang/20/include/amdgpuintrin.h +194 -0
- package/lib/clang/20/include/amxavx512intrin.h +382 -0
- package/lib/clang/20/include/amxbf16transposeintrin.h +94 -0
- package/lib/clang/20/include/amxcomplextransposeintrin.h +303 -0
- package/lib/clang/{18 → 20}/include/amxfp16intrin.h +35 -0
- package/lib/clang/20/include/amxfp16transposeintrin.h +94 -0
- package/lib/clang/20/include/amxfp8intrin.h +230 -0
- package/lib/clang/{18 → 20}/include/amxintrin.h +5 -35
- package/lib/clang/20/include/amxmovrsintrin.h +48 -0
- package/lib/clang/20/include/amxmovrstransposeintrin.h +200 -0
- package/lib/clang/20/include/amxtf32intrin.h +108 -0
- package/lib/clang/20/include/amxtf32transposeintrin.h +105 -0
- package/lib/clang/20/include/amxtransposeintrin.h +248 -0
- package/lib/clang/{18 → 20}/include/arm_acle.h +49 -26
- package/lib/clang/{18 → 20}/include/arm_fp16.h +1 -1
- package/lib/clang/{18 → 20}/include/arm_neon.h +45631 -43745
- package/lib/clang/{18 → 20}/include/arm_sme.h +641 -6
- package/lib/clang/{18 → 20}/include/arm_sve.h +28311 -27738
- package/lib/clang/{18 → 20}/include/arm_vector_types.h +92 -5
- package/lib/clang/20/include/avx10_2_512bf16intrin.h +561 -0
- package/lib/clang/20/include/avx10_2_512convertintrin.h +320 -0
- package/lib/clang/20/include/avx10_2_512minmaxintrin.h +127 -0
- package/lib/clang/20/include/avx10_2_512niintrin.h +314 -0
- package/lib/clang/20/include/avx10_2_512satcvtdsintrin.h +303 -0
- package/lib/clang/20/include/avx10_2_512satcvtintrin.h +301 -0
- package/lib/clang/20/include/avx10_2bf16intrin.h +1085 -0
- package/lib/clang/20/include/avx10_2convertintrin.h +589 -0
- package/lib/clang/20/include/avx10_2copyintrin.h +66 -0
- package/lib/clang/20/include/avx10_2minmaxintrin.h +277 -0
- package/lib/clang/20/include/avx10_2niintrin.h +2075 -0
- package/lib/clang/20/include/avx10_2satcvtdsintrin.h +496 -0
- package/lib/clang/20/include/avx10_2satcvtintrin.h +444 -0
- package/lib/clang/{18 → 20}/include/avx2intrin.h +9 -0
- package/lib/clang/{18 → 20}/include/avx512bitalgintrin.h +2 -2
- package/lib/clang/{18 → 20}/include/avx512fintrin.h +22 -14
- package/lib/clang/{18 → 20}/include/avx512fp16intrin.h +38 -38
- package/lib/clang/{18 → 20}/include/avx512vlbitalgintrin.h +4 -4
- package/lib/clang/{18 → 20}/include/avx512vpopcntdqintrin.h +12 -4
- package/lib/clang/{18 → 20}/include/avx512vpopcntdqvlintrin.h +16 -8
- package/lib/clang/{18 → 20}/include/avxintrin.h +88 -60
- package/lib/clang/{18 → 20}/include/avxvnniint16intrin.h +36 -77
- package/lib/clang/{18 → 20}/include/avxvnniint8intrin.h +36 -77
- package/lib/clang/{18 → 20}/include/bmi2intrin.h +15 -17
- package/lib/clang/{18 → 20}/include/bmiintrin.h +33 -41
- package/lib/clang/{18 → 20}/include/builtins.h +3 -0
- package/lib/clang/{18 → 20}/include/cmpccxaddintrin.h +1 -1
- package/lib/clang/{18 → 20}/include/cpuid.h +35 -14
- package/lib/clang/{18 → 20}/include/cuda_wrappers/algorithm +1 -1
- package/lib/clang/{18 → 20}/include/cuda_wrappers/cmath +4 -0
- package/lib/clang/{18 → 20}/include/cuda_wrappers/new +2 -0
- package/lib/clang/{18 → 20}/include/emmintrin.h +442 -277
- package/lib/clang/{18 → 20}/include/float.h +28 -0
- package/lib/clang/{18 → 20}/include/fmaintrin.h +32 -16
- package/lib/clang/{18 → 20}/include/gfniintrin.h +32 -10
- package/lib/clang/20/include/gpuintrin.h +224 -0
- package/lib/clang/{18 → 20}/include/hexagon_types.h +8 -4
- package/lib/clang/{18 → 20}/include/hlsl/hlsl_basic_types.h +57 -4
- package/lib/clang/20/include/hlsl/hlsl_detail.h +84 -0
- package/lib/clang/20/include/hlsl/hlsl_intrinsics.h +2814 -0
- package/lib/clang/{18 → 20}/include/hlsl.h +11 -0
- package/lib/clang/{18 → 20}/include/hvx_hexagon_protos.h +427 -0
- package/lib/clang/{18 → 20}/include/ia32intrin.h +36 -36
- package/lib/clang/{18 → 20}/include/immintrin.h +171 -161
- package/lib/clang/{18 → 20}/include/intrin.h +62 -228
- package/lib/clang/20/include/intrin0.h +256 -0
- package/lib/clang/{18 → 20}/include/inttypes.h +4 -0
- package/lib/clang/{18 → 20}/include/iso646.h +4 -0
- package/lib/clang/{18 → 20}/include/keylockerintrin.h +5 -8
- package/lib/clang/{18 → 20}/include/larchintrin.h +22 -8
- package/lib/clang/{18 → 20}/include/lasxintrin.h +27 -25
- package/lib/clang/{18 → 20}/include/limits.h +12 -4
- package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/assert.h +1 -1
- package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/ctype.h +38 -0
- package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/stdlib.h +8 -0
- package/lib/clang/20/include/llvm_offload_wrappers/__llvm_offload.h +31 -0
- package/lib/clang/20/include/llvm_offload_wrappers/__llvm_offload_device.h +10 -0
- package/lib/clang/20/include/llvm_offload_wrappers/__llvm_offload_host.h +15 -0
- package/lib/clang/{18 → 20}/include/lsxintrin.h +27 -25
- package/lib/clang/{18 → 20}/include/lzcntintrin.h +10 -7
- package/lib/clang/20/include/mm3dnow.h +22 -0
- package/lib/clang/{18 → 20}/include/mmintrin.h +285 -239
- package/lib/clang/{18 → 20}/include/module.modulemap +16 -5
- package/lib/clang/20/include/movrs_avx10_2_512intrin.h +98 -0
- package/lib/clang/20/include/movrs_avx10_2intrin.h +174 -0
- package/lib/clang/20/include/movrsintrin.h +59 -0
- package/lib/clang/20/include/nvptxintrin.h +202 -0
- package/lib/clang/{18 → 20}/include/opencl-c-base.h +8 -0
- package/lib/clang/{18 → 20}/include/opencl-c.h +15 -0
- package/lib/clang/{18 → 20}/include/openmp_wrappers/__clang_openmp_device_functions.h +4 -5
- package/lib/clang/{18 → 20}/include/openmp_wrappers/complex_cmath.h +7 -2
- package/lib/clang/{18 → 20}/include/pmmintrin.h +16 -3
- package/lib/clang/{18 → 20}/include/popcntintrin.h +7 -7
- package/lib/clang/{18 → 20}/include/prfchwintrin.h +10 -8
- package/lib/clang/20/include/ptrauth.h +336 -0
- package/lib/clang/20/include/riscv_corev_alu.h +128 -0
- package/lib/clang/{18 → 20}/include/riscv_vector.h +0 -5
- package/lib/clang/20/include/sifive_vector.h +118 -0
- package/lib/clang/20/include/sm4evexintrin.h +32 -0
- package/lib/clang/{18 → 20}/include/smmintrin.h +18 -12
- package/lib/clang/{18 → 20}/include/stdarg.h +15 -19
- package/lib/clang/{18 → 20}/include/stdatomic.h +11 -1
- package/lib/clang/{18 → 20}/include/stdbool.h +5 -0
- package/lib/clang/{18 → 20}/include/stddef.h +38 -22
- package/lib/clang/{18 → 20}/include/stdint.h +5 -0
- package/lib/clang/{18 → 20}/include/stdnoreturn.h +6 -0
- package/lib/clang/{18 → 20}/include/tbmintrin.h +25 -37
- package/lib/clang/{18 → 20}/include/tmmintrin.h +84 -54
- package/lib/clang/{18 → 20}/include/varargs.h +5 -1
- package/lib/clang/{18 → 20}/include/vecintrin.h +1778 -60
- package/lib/clang/{18 → 20}/include/wasm_simd128.h +167 -21
- package/lib/clang/{18 → 20}/include/x86gprintrin.h +7 -14
- package/lib/clang/20/include/x86intrin.h +53 -0
- package/lib/clang/{18 → 20}/include/xmmintrin.h +455 -276
- package/lib/clang/20/include/yvals_core.h +25 -0
- package/lib/clang/20/include/zos_wrappers/builtins.h +18 -0
- package/package.json +6 -6
- package/lib/clang/18/include/avx512erintrin.h +0 -271
- package/lib/clang/18/include/avx512pfintrin.h +0 -92
- package/lib/clang/18/include/hlsl/hlsl_intrinsics.h +0 -624
- package/lib/clang/18/include/mm3dnow.h +0 -157
- package/lib/clang/18/include/sifive_vector.h +0 -16
- package/lib/clang/18/include/x86intrin.h +0 -67
- /package/lib/clang/{18 → 20}/include/__clang_cuda_builtin_vars.h +0 -0
- /package/lib/clang/{18 → 20}/include/__clang_cuda_cmath.h +0 -0
- /package/lib/clang/{18 → 20}/include/__clang_cuda_complex_builtins.h +0 -0
- /package/lib/clang/{18 → 20}/include/__clang_cuda_libdevice_declares.h +0 -0
- /package/lib/clang/{18 → 20}/include/__clang_cuda_math_forward_declares.h +0 -0
- /package/lib/clang/{18 → 20}/include/__clang_cuda_runtime_wrapper.h +0 -0
- /package/lib/clang/{18 → 20}/include/__clang_cuda_texture_intrinsics.h +0 -0
- /package/lib/clang/{18 → 20}/include/__clang_hip_libdevice_declares.h +0 -0
- /package/lib/clang/{18 → 20}/include/__clang_hip_runtime_wrapper.h +0 -0
- /package/lib/clang/{18 → 20}/include/__clang_hip_stdlib.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stdarg___gnuc_va_list.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stdarg___va_copy.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stdarg_va_arg.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stdarg_va_copy.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stdarg_va_list.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stddef_max_align_t.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stddef_null.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stddef_nullptr_t.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stddef_offsetof.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stddef_ptrdiff_t.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stddef_rsize_t.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stddef_size_t.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stddef_unreachable.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stddef_wchar_t.h +0 -0
- /package/lib/clang/{18 → 20}/include/__stddef_wint_t.h +0 -0
- /package/lib/clang/{18 → 20}/include/__wmmintrin_aes.h +0 -0
- /package/lib/clang/{18 → 20}/include/__wmmintrin_pclmul.h +0 -0
- /package/lib/clang/{18 → 20}/include/ammintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/amxcomplexintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/arm64intr.h +0 -0
- /package/lib/clang/{18 → 20}/include/arm_bf16.h +0 -0
- /package/lib/clang/{18 → 20}/include/arm_cde.h +0 -0
- /package/lib/clang/{18 → 20}/include/arm_cmse.h +0 -0
- /package/lib/clang/{18 → 20}/include/arm_mve.h +0 -0
- /package/lib/clang/{18 → 20}/include/arm_neon_sve_bridge.h +0 -0
- /package/lib/clang/{18 → 20}/include/armintr.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512bf16intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512bwintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512cdintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512dqintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512ifmaintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512ifmavlintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vbmi2intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vbmiintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vbmivlintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vlbf16intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vlbwintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vlcdintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vldqintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vlfp16intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vlintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vlvbmi2intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vlvnniintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vlvp2intersectintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vnniintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avx512vp2intersectintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avxifmaintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avxneconvertintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/avxvnniintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/cet.h +0 -0
- /package/lib/clang/{18 → 20}/include/cetintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/cldemoteintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/clflushoptintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/clwbintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/clzerointrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/crc32intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/cuda_wrappers/bits/basic_string.h +0 -0
- /package/lib/clang/{18 → 20}/include/cuda_wrappers/bits/basic_string.tcc +0 -0
- /package/lib/clang/{18 → 20}/include/cuda_wrappers/bits/shared_ptr_base.h +0 -0
- /package/lib/clang/{18 → 20}/include/cuda_wrappers/complex +0 -0
- /package/lib/clang/{18 → 20}/include/enqcmdintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/f16cintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/fma4intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/fxsrintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/hexagon_circ_brev_intrinsics.h +0 -0
- /package/lib/clang/{18 → 20}/include/hexagon_protos.h +0 -0
- /package/lib/clang/{18 → 20}/include/hresetintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/htmintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/htmxlintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/invpcidintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/inttypes.h +0 -0
- /package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/stdio.h +0 -0
- /package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/string.h +0 -0
- /package/lib/clang/{18 → 20}/include/llvm_libc_wrappers/time.h +0 -0
- /package/lib/clang/{18 → 20}/include/lwpintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/mm_malloc.h +0 -0
- /package/lib/clang/{18 → 20}/include/movdirintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/msa.h +0 -0
- /package/lib/clang/{18 → 20}/include/mwaitxintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/nmmintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/openmp_wrappers/cmath +0 -0
- /package/lib/clang/{18 → 20}/include/openmp_wrappers/complex +0 -0
- /package/lib/clang/{18 → 20}/include/openmp_wrappers/complex.h +0 -0
- /package/lib/clang/{18 → 20}/include/openmp_wrappers/math.h +0 -0
- /package/lib/clang/{18 → 20}/include/openmp_wrappers/new +0 -0
- /package/lib/clang/{18 → 20}/include/pconfigintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/pkuintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/bmi2intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/bmiintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/emmintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/immintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/mm_malloc.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/mmintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/nmmintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/pmmintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/smmintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/tmmintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/x86gprintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/x86intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ppc_wrappers/xmmintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/prfchiintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/ptwriteintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/raointintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/rdpruintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/rdseedintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/riscv_bitmanip.h +0 -0
- /package/lib/clang/{18 → 20}/include/riscv_crypto.h +0 -0
- /package/lib/clang/{18 → 20}/include/riscv_ntlh.h +0 -0
- /package/lib/clang/{18 → 20}/include/rtmintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/s390intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/serializeintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/sgxintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/sha512intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/shaintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/sm3intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/sm4intrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/stdalign.h +0 -0
- /package/lib/clang/{18 → 20}/include/stdckdint.h +0 -0
- /package/lib/clang/{18 → 20}/include/tgmath.h +0 -0
- /package/lib/clang/{18 → 20}/include/tsxldtrkintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/uintrintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/unwind.h +0 -0
- /package/lib/clang/{18 → 20}/include/usermsrintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/vadefs.h +0 -0
- /package/lib/clang/{18 → 20}/include/vaesintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/velintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/velintrin_approx.h +0 -0
- /package/lib/clang/{18 → 20}/include/velintrin_gen.h +0 -0
- /package/lib/clang/{18 → 20}/include/vpclmulqdqintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/waitpkgintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/wbnoinvdintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/wmmintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/xopintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/xsavecintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/xsaveintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/xsaveoptintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/xsavesintrin.h +0 -0
- /package/lib/clang/{18 → 20}/include/xtestintrin.h +0 -0
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
#ifndef __CLANG_FLOAT_H
|
|
11
11
|
#define __CLANG_FLOAT_H
|
|
12
12
|
|
|
13
|
+
#if defined(__MVS__) && __has_include_next(<float.h>)
|
|
14
|
+
#include_next <float.h>
|
|
15
|
+
#else
|
|
16
|
+
|
|
13
17
|
/* If we're on MinGW, fall back to the system's float.h, which might have
|
|
14
18
|
* additional definitions provided for Windows.
|
|
15
19
|
* For more details see http://msdn.microsoft.com/en-us/library/y0ybw9fy.aspx
|
|
@@ -82,6 +86,18 @@
|
|
|
82
86
|
# undef DBL_HAS_SUBNORM
|
|
83
87
|
# undef LDBL_HAS_SUBNORM
|
|
84
88
|
# endif
|
|
89
|
+
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \
|
|
90
|
+
!defined(__STRICT_ANSI__)
|
|
91
|
+
# undef FLT_NORM_MAX
|
|
92
|
+
# undef DBL_NORM_MAX
|
|
93
|
+
# undef LDBL_NORM_MAX
|
|
94
|
+
#endif
|
|
95
|
+
#endif
|
|
96
|
+
|
|
97
|
+
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \
|
|
98
|
+
!defined(__STRICT_ANSI__)
|
|
99
|
+
# undef INFINITY
|
|
100
|
+
# undef NAN
|
|
85
101
|
#endif
|
|
86
102
|
|
|
87
103
|
/* Characteristics of floating point types, C99 5.2.4.2.2 */
|
|
@@ -151,6 +167,17 @@
|
|
|
151
167
|
# define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__
|
|
152
168
|
#endif
|
|
153
169
|
|
|
170
|
+
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || \
|
|
171
|
+
!defined(__STRICT_ANSI__)
|
|
172
|
+
/* C23 5.2.5.3.3p29-30 */
|
|
173
|
+
# define INFINITY (__builtin_inff())
|
|
174
|
+
# define NAN (__builtin_nanf(""))
|
|
175
|
+
/* C23 5.2.5.3.3p32 */
|
|
176
|
+
# define FLT_NORM_MAX __FLT_NORM_MAX__
|
|
177
|
+
# define DBL_NORM_MAX __DBL_NORM_MAX__
|
|
178
|
+
# define LDBL_NORM_MAX __LDBL_NORM_MAX__
|
|
179
|
+
#endif
|
|
180
|
+
|
|
154
181
|
#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__
|
|
155
182
|
# define FLT16_MANT_DIG __FLT16_MANT_DIG__
|
|
156
183
|
# define FLT16_DECIMAL_DIG __FLT16_DECIMAL_DIG__
|
|
@@ -165,4 +192,5 @@
|
|
|
165
192
|
# define FLT16_TRUE_MIN __FLT16_TRUE_MIN__
|
|
166
193
|
#endif /* __STDC_WANT_IEC_60559_TYPES_EXT__ */
|
|
167
194
|
|
|
195
|
+
#endif /* __MVS__ */
|
|
168
196
|
#endif /* __CLANG_FLOAT_H */
|
|
@@ -60,7 +60,8 @@ _mm_fmadd_pd(__m128d __A, __m128d __B, __m128d __C)
|
|
|
60
60
|
|
|
61
61
|
/// Computes a scalar multiply-add of the single-precision values in the
|
|
62
62
|
/// low 32 bits of 128-bit vectors of [4 x float].
|
|
63
|
-
///
|
|
63
|
+
///
|
|
64
|
+
/// \code{.operation}
|
|
64
65
|
/// result[31:0] = (__A[31:0] * __B[31:0]) + __C[31:0]
|
|
65
66
|
/// result[127:32] = __A[127:32]
|
|
66
67
|
/// \endcode
|
|
@@ -88,7 +89,8 @@ _mm_fmadd_ss(__m128 __A, __m128 __B, __m128 __C)
|
|
|
88
89
|
|
|
89
90
|
/// Computes a scalar multiply-add of the double-precision values in the
|
|
90
91
|
/// low 64 bits of 128-bit vectors of [2 x double].
|
|
91
|
-
///
|
|
92
|
+
///
|
|
93
|
+
/// \code{.operation}
|
|
92
94
|
/// result[63:0] = (__A[63:0] * __B[63:0]) + __C[63:0]
|
|
93
95
|
/// result[127:64] = __A[127:64]
|
|
94
96
|
/// \endcode
|
|
@@ -156,7 +158,8 @@ _mm_fmsub_pd(__m128d __A, __m128d __B, __m128d __C)
|
|
|
156
158
|
|
|
157
159
|
/// Computes a scalar multiply-subtract of the single-precision values in
|
|
158
160
|
/// the low 32 bits of 128-bit vectors of [4 x float].
|
|
159
|
-
///
|
|
161
|
+
///
|
|
162
|
+
/// \code{.operation}
|
|
160
163
|
/// result[31:0] = (__A[31:0] * __B[31:0]) - __C[31:0]
|
|
161
164
|
/// result[127:32] = __A[127:32]
|
|
162
165
|
/// \endcode
|
|
@@ -184,7 +187,8 @@ _mm_fmsub_ss(__m128 __A, __m128 __B, __m128 __C)
|
|
|
184
187
|
|
|
185
188
|
/// Computes a scalar multiply-subtract of the double-precision values in
|
|
186
189
|
/// the low 64 bits of 128-bit vectors of [2 x double].
|
|
187
|
-
///
|
|
190
|
+
///
|
|
191
|
+
/// \code{.operation}
|
|
188
192
|
/// result[63:0] = (__A[63:0] * __B[63:0]) - __C[63:0]
|
|
189
193
|
/// result[127:64] = __A[127:64]
|
|
190
194
|
/// \endcode
|
|
@@ -252,7 +256,8 @@ _mm_fnmadd_pd(__m128d __A, __m128d __B, __m128d __C)
|
|
|
252
256
|
|
|
253
257
|
/// Computes a scalar negated multiply-add of the single-precision values in
|
|
254
258
|
/// the low 32 bits of 128-bit vectors of [4 x float].
|
|
255
|
-
///
|
|
259
|
+
///
|
|
260
|
+
/// \code{.operation}
|
|
256
261
|
/// result[31:0] = -(__A[31:0] * __B[31:0]) + __C[31:0]
|
|
257
262
|
/// result[127:32] = __A[127:32]
|
|
258
263
|
/// \endcode
|
|
@@ -280,7 +285,8 @@ _mm_fnmadd_ss(__m128 __A, __m128 __B, __m128 __C)
|
|
|
280
285
|
|
|
281
286
|
/// Computes a scalar negated multiply-add of the double-precision values
|
|
282
287
|
/// in the low 64 bits of 128-bit vectors of [2 x double].
|
|
283
|
-
///
|
|
288
|
+
///
|
|
289
|
+
/// \code{.operation}
|
|
284
290
|
/// result[63:0] = -(__A[63:0] * __B[63:0]) + __C[63:0]
|
|
285
291
|
/// result[127:64] = __A[127:64]
|
|
286
292
|
/// \endcode
|
|
@@ -348,7 +354,8 @@ _mm_fnmsub_pd(__m128d __A, __m128d __B, __m128d __C)
|
|
|
348
354
|
|
|
349
355
|
/// Computes a scalar negated multiply-subtract of the single-precision
|
|
350
356
|
/// values in the low 32 bits of 128-bit vectors of [4 x float].
|
|
351
|
-
///
|
|
357
|
+
///
|
|
358
|
+
/// \code{.operation}
|
|
352
359
|
/// result[31:0] = -(__A[31:0] * __B[31:0]) - __C[31:0]
|
|
353
360
|
/// result[127:32] = __A[127:32]
|
|
354
361
|
/// \endcode
|
|
@@ -376,7 +383,8 @@ _mm_fnmsub_ss(__m128 __A, __m128 __B, __m128 __C)
|
|
|
376
383
|
|
|
377
384
|
/// Computes a scalar negated multiply-subtract of the double-precision
|
|
378
385
|
/// values in the low 64 bits of 128-bit vectors of [2 x double].
|
|
379
|
-
///
|
|
386
|
+
///
|
|
387
|
+
/// \code{.operation}
|
|
380
388
|
/// result[63:0] = -(__A[63:0] * __B[63:0]) - __C[63:0]
|
|
381
389
|
/// result[127:64] = __A[127:64]
|
|
382
390
|
/// \endcode
|
|
@@ -404,7 +412,8 @@ _mm_fnmsub_sd(__m128d __A, __m128d __B, __m128d __C)
|
|
|
404
412
|
|
|
405
413
|
/// Computes a multiply with alternating add/subtract of 128-bit vectors of
|
|
406
414
|
/// [4 x float].
|
|
407
|
-
///
|
|
415
|
+
///
|
|
416
|
+
/// \code{.operation}
|
|
408
417
|
/// result[31:0] = (__A[31:0] * __B[31:0]) - __C[31:0]
|
|
409
418
|
/// result[63:32] = (__A[63:32] * __B[63:32]) + __C[63:32]
|
|
410
419
|
/// result[95:64] = (__A[95:64] * __B[95:64]) - __C[95:64]
|
|
@@ -430,7 +439,8 @@ _mm_fmaddsub_ps(__m128 __A, __m128 __B, __m128 __C)
|
|
|
430
439
|
|
|
431
440
|
/// Computes a multiply with alternating add/subtract of 128-bit vectors of
|
|
432
441
|
/// [2 x double].
|
|
433
|
-
///
|
|
442
|
+
///
|
|
443
|
+
/// \code{.operation}
|
|
434
444
|
/// result[63:0] = (__A[63:0] * __B[63:0]) - __C[63:0]
|
|
435
445
|
/// result[127:64] = (__A[127:64] * __B[127:64]) + __C[127:64]
|
|
436
446
|
/// \endcode
|
|
@@ -454,7 +464,8 @@ _mm_fmaddsub_pd(__m128d __A, __m128d __B, __m128d __C)
|
|
|
454
464
|
|
|
455
465
|
/// Computes a multiply with alternating add/subtract of 128-bit vectors of
|
|
456
466
|
/// [4 x float].
|
|
457
|
-
///
|
|
467
|
+
///
|
|
468
|
+
/// \code{.operation}
|
|
458
469
|
/// result[31:0] = (__A[31:0] * __B[31:0]) + __C[31:0]
|
|
459
470
|
/// result[63:32] = (__A[63:32] * __B[63:32]) - __C[63:32]
|
|
460
471
|
/// result[95:64] = (__A[95:64] * __B[95:64]) + __C[95:64]
|
|
@@ -480,7 +491,8 @@ _mm_fmsubadd_ps(__m128 __A, __m128 __B, __m128 __C)
|
|
|
480
491
|
|
|
481
492
|
/// Computes a multiply with alternating add/subtract of 128-bit vectors of
|
|
482
493
|
/// [2 x double].
|
|
483
|
-
///
|
|
494
|
+
///
|
|
495
|
+
/// \code{.operation}
|
|
484
496
|
/// result[63:0] = (__A[63:0] * __B[63:0]) + __C[63:0]
|
|
485
497
|
/// result[127:64] = (__A[127:64] * __B[127:64]) - __C[127:64]
|
|
486
498
|
/// \endcode
|
|
@@ -664,7 +676,8 @@ _mm256_fnmsub_pd(__m256d __A, __m256d __B, __m256d __C)
|
|
|
664
676
|
|
|
665
677
|
/// Computes a multiply with alternating add/subtract of 256-bit vectors of
|
|
666
678
|
/// [8 x float].
|
|
667
|
-
///
|
|
679
|
+
///
|
|
680
|
+
/// \code{.operation}
|
|
668
681
|
/// result[31:0] = (__A[31:0] * __B[31:0]) - __C[31:0]
|
|
669
682
|
/// result[63:32] = (__A[63:32] * __B[63:32]) + __C[63:32]
|
|
670
683
|
/// result[95:64] = (__A[95:64] * __B[95:64]) - __C[95:64]
|
|
@@ -694,7 +707,8 @@ _mm256_fmaddsub_ps(__m256 __A, __m256 __B, __m256 __C)
|
|
|
694
707
|
|
|
695
708
|
/// Computes a multiply with alternating add/subtract of 256-bit vectors of
|
|
696
709
|
/// [4 x double].
|
|
697
|
-
///
|
|
710
|
+
///
|
|
711
|
+
/// \code{.operation}
|
|
698
712
|
/// result[63:0] = (__A[63:0] * __B[63:0]) - __C[63:0]
|
|
699
713
|
/// result[127:64] = (__A[127:64] * __B[127:64]) + __C[127:64]
|
|
700
714
|
/// result[191:128] = (__A[191:128] * __B[191:128]) - __C[191:128]
|
|
@@ -720,7 +734,8 @@ _mm256_fmaddsub_pd(__m256d __A, __m256d __B, __m256d __C)
|
|
|
720
734
|
|
|
721
735
|
/// Computes a vector multiply with alternating add/subtract of 256-bit
|
|
722
736
|
/// vectors of [8 x float].
|
|
723
|
-
///
|
|
737
|
+
///
|
|
738
|
+
/// \code{.operation}
|
|
724
739
|
/// result[31:0] = (__A[31:0] * __B[31:0]) + __C[31:0]
|
|
725
740
|
/// result[63:32] = (__A[63:32] * __B[63:32]) - __C[63:32]
|
|
726
741
|
/// result[95:64] = (__A[95:64] * __B[95:64]) + __C[95:64]
|
|
@@ -750,7 +765,8 @@ _mm256_fmsubadd_ps(__m256 __A, __m256 __B, __m256 __C)
|
|
|
750
765
|
|
|
751
766
|
/// Computes a vector multiply with alternating add/subtract of 256-bit
|
|
752
767
|
/// vectors of [4 x double].
|
|
753
|
-
///
|
|
768
|
+
///
|
|
769
|
+
/// \code{.operation}
|
|
754
770
|
/// result[63:0] = (__A[63:0] * __B[63:0]) + __C[63:0]
|
|
755
771
|
/// result[127:64] = (__A[127:64] * __B[127:64]) - __C[127:64]
|
|
756
772
|
/// result[191:128] = (__A[191:128] * __B[191:128]) + __C[191:128]
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
#ifndef __GFNIINTRIN_H
|
|
15
15
|
#define __GFNIINTRIN_H
|
|
16
16
|
|
|
17
|
+
#if defined(__EVEX512__) && !defined(__AVX10_1_512__)
|
|
17
18
|
/* Default attributes for simple form (no masking). */
|
|
18
19
|
#define __DEFAULT_FN_ATTRS \
|
|
19
20
|
__attribute__((__always_inline__, __nodebug__, \
|
|
@@ -25,26 +26,47 @@
|
|
|
25
26
|
__target__("avx,gfni,no-evex512"), \
|
|
26
27
|
__min_vector_width__(256)))
|
|
27
28
|
|
|
28
|
-
/* Default attributes for
|
|
29
|
-
#define
|
|
29
|
+
/* Default attributes for VLX masked forms. */
|
|
30
|
+
#define __DEFAULT_FN_ATTRS_VL128 \
|
|
30
31
|
__attribute__((__always_inline__, __nodebug__, \
|
|
31
|
-
__target__("
|
|
32
|
-
__min_vector_width__(
|
|
33
|
-
|
|
34
|
-
#define __DEFAULT_FN_ATTRS_Z_MASK \
|
|
32
|
+
__target__("avx512bw,avx512vl,gfni,no-evex512"), \
|
|
33
|
+
__min_vector_width__(128)))
|
|
34
|
+
#define __DEFAULT_FN_ATTRS_VL256 \
|
|
35
35
|
__attribute__((__always_inline__, __nodebug__, \
|
|
36
|
-
__target__("avx512bw,
|
|
37
|
-
__min_vector_width__(
|
|
36
|
+
__target__("avx512bw,avx512vl,gfni,no-evex512"), \
|
|
37
|
+
__min_vector_width__(256)))
|
|
38
|
+
#else
|
|
39
|
+
/* Default attributes for simple form (no masking). */
|
|
40
|
+
#define __DEFAULT_FN_ATTRS \
|
|
41
|
+
__attribute__((__always_inline__, __nodebug__, __target__("gfni"), \
|
|
42
|
+
__min_vector_width__(128)))
|
|
43
|
+
|
|
44
|
+
/* Default attributes for YMM unmasked form. */
|
|
45
|
+
#define __DEFAULT_FN_ATTRS_Y \
|
|
46
|
+
__attribute__((__always_inline__, __nodebug__, __target__("avx,gfni"), \
|
|
47
|
+
__min_vector_width__(256)))
|
|
38
48
|
|
|
39
49
|
/* Default attributes for VLX masked forms. */
|
|
40
50
|
#define __DEFAULT_FN_ATTRS_VL128 \
|
|
41
51
|
__attribute__((__always_inline__, __nodebug__, \
|
|
42
|
-
__target__("avx512bw,avx512vl,gfni
|
|
52
|
+
__target__("avx512bw,avx512vl,gfni"), \
|
|
43
53
|
__min_vector_width__(128)))
|
|
44
54
|
#define __DEFAULT_FN_ATTRS_VL256 \
|
|
45
55
|
__attribute__((__always_inline__, __nodebug__, \
|
|
46
|
-
__target__("avx512bw,avx512vl,gfni
|
|
56
|
+
__target__("avx512bw,avx512vl,gfni"), \
|
|
47
57
|
__min_vector_width__(256)))
|
|
58
|
+
#endif
|
|
59
|
+
|
|
60
|
+
/* Default attributes for ZMM unmasked forms. */
|
|
61
|
+
#define __DEFAULT_FN_ATTRS_Z \
|
|
62
|
+
__attribute__((__always_inline__, __nodebug__, \
|
|
63
|
+
__target__("avx512f,evex512,gfni"), \
|
|
64
|
+
__min_vector_width__(512)))
|
|
65
|
+
/* Default attributes for ZMM masked forms. */
|
|
66
|
+
#define __DEFAULT_FN_ATTRS_Z_MASK \
|
|
67
|
+
__attribute__((__always_inline__, __nodebug__, \
|
|
68
|
+
__target__("avx512bw,evex512,gfni"), \
|
|
69
|
+
__min_vector_width__(512)))
|
|
48
70
|
|
|
49
71
|
#define _mm_gf2p8affineinv_epi64_epi8(A, B, I) \
|
|
50
72
|
((__m128i)__builtin_ia32_vgf2p8affineinvqb_v16qi((__v16qi)(__m128i)(A), \
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
//===-- gpuintrin.h - Generic GPU intrinsic functions ---------------------===//
|
|
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
|
+
// Provides wrappers around the clang builtins for accessing GPU hardware
|
|
10
|
+
// features. The interface is intended to be portable between architectures, but
|
|
11
|
+
// some targets may provide different implementations. This header can be
|
|
12
|
+
// included for all the common GPU programming languages, namely OpenMP, HIP,
|
|
13
|
+
// CUDA, and OpenCL.
|
|
14
|
+
//
|
|
15
|
+
//===----------------------------------------------------------------------===//
|
|
16
|
+
|
|
17
|
+
#ifndef __GPUINTRIN_H
|
|
18
|
+
#define __GPUINTRIN_H
|
|
19
|
+
|
|
20
|
+
#if !defined(_DEFAULT_FN_ATTRS)
|
|
21
|
+
#if defined(__HIP__) || defined(__CUDA__)
|
|
22
|
+
#define _DEFAULT_FN_ATTRS __attribute__((device))
|
|
23
|
+
#else
|
|
24
|
+
#define _DEFAULT_FN_ATTRS
|
|
25
|
+
#endif
|
|
26
|
+
#endif
|
|
27
|
+
|
|
28
|
+
#if defined(__NVPTX__)
|
|
29
|
+
#include <nvptxintrin.h>
|
|
30
|
+
#elif defined(__AMDGPU__)
|
|
31
|
+
#include <amdgpuintrin.h>
|
|
32
|
+
#elif !defined(_OPENMP)
|
|
33
|
+
#error "This header is only meant to be used on GPU architectures."
|
|
34
|
+
#endif
|
|
35
|
+
|
|
36
|
+
#include <stdint.h>
|
|
37
|
+
|
|
38
|
+
#if !defined(__cplusplus)
|
|
39
|
+
_Pragma("push_macro(\"bool\")");
|
|
40
|
+
#define bool _Bool
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
_Pragma("omp begin declare target device_type(nohost)");
|
|
44
|
+
_Pragma("omp begin declare variant match(device = {kind(gpu)})");
|
|
45
|
+
|
|
46
|
+
#define __GPU_X_DIM 0
|
|
47
|
+
#define __GPU_Y_DIM 1
|
|
48
|
+
#define __GPU_Z_DIM 2
|
|
49
|
+
|
|
50
|
+
// Returns the number of blocks in the requested dimension.
|
|
51
|
+
_DEFAULT_FN_ATTRS static __inline__ uint32_t __gpu_num_blocks(int __dim) {
|
|
52
|
+
switch (__dim) {
|
|
53
|
+
case 0:
|
|
54
|
+
return __gpu_num_blocks_x();
|
|
55
|
+
case 1:
|
|
56
|
+
return __gpu_num_blocks_y();
|
|
57
|
+
case 2:
|
|
58
|
+
return __gpu_num_blocks_z();
|
|
59
|
+
default:
|
|
60
|
+
__builtin_unreachable();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Returns the number of block id in the requested dimension.
|
|
65
|
+
_DEFAULT_FN_ATTRS static __inline__ uint32_t __gpu_block_id(int __dim) {
|
|
66
|
+
switch (__dim) {
|
|
67
|
+
case 0:
|
|
68
|
+
return __gpu_block_id_x();
|
|
69
|
+
case 1:
|
|
70
|
+
return __gpu_block_id_y();
|
|
71
|
+
case 2:
|
|
72
|
+
return __gpu_block_id_z();
|
|
73
|
+
default:
|
|
74
|
+
__builtin_unreachable();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Returns the number of threads in the requested dimension.
|
|
79
|
+
_DEFAULT_FN_ATTRS static __inline__ uint32_t __gpu_num_threads(int __dim) {
|
|
80
|
+
switch (__dim) {
|
|
81
|
+
case 0:
|
|
82
|
+
return __gpu_num_threads_x();
|
|
83
|
+
case 1:
|
|
84
|
+
return __gpu_num_threads_y();
|
|
85
|
+
case 2:
|
|
86
|
+
return __gpu_num_threads_z();
|
|
87
|
+
default:
|
|
88
|
+
__builtin_unreachable();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Returns the thread id in the requested dimension.
|
|
93
|
+
_DEFAULT_FN_ATTRS static __inline__ uint32_t __gpu_thread_id(int __dim) {
|
|
94
|
+
switch (__dim) {
|
|
95
|
+
case 0:
|
|
96
|
+
return __gpu_thread_id_x();
|
|
97
|
+
case 1:
|
|
98
|
+
return __gpu_thread_id_y();
|
|
99
|
+
case 2:
|
|
100
|
+
return __gpu_thread_id_z();
|
|
101
|
+
default:
|
|
102
|
+
__builtin_unreachable();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Get the first active thread inside the lane.
|
|
107
|
+
_DEFAULT_FN_ATTRS static __inline__ uint64_t
|
|
108
|
+
__gpu_first_lane_id(uint64_t __lane_mask) {
|
|
109
|
+
return __builtin_ffsll(__lane_mask) - 1;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Conditional that is only true for a single thread in a lane.
|
|
113
|
+
_DEFAULT_FN_ATTRS static __inline__ bool
|
|
114
|
+
__gpu_is_first_in_lane(uint64_t __lane_mask) {
|
|
115
|
+
return __gpu_lane_id() == __gpu_first_lane_id(__lane_mask);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Gets the first floating point value from the active lanes.
|
|
119
|
+
_DEFAULT_FN_ATTRS static __inline__ float
|
|
120
|
+
__gpu_read_first_lane_f32(uint64_t __lane_mask, float __x) {
|
|
121
|
+
return __builtin_bit_cast(
|
|
122
|
+
float, __gpu_read_first_lane_u32(__lane_mask,
|
|
123
|
+
__builtin_bit_cast(uint32_t, __x)));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Gets the first floating point value from the active lanes.
|
|
127
|
+
_DEFAULT_FN_ATTRS static __inline__ double
|
|
128
|
+
__gpu_read_first_lane_f64(uint64_t __lane_mask, double __x) {
|
|
129
|
+
return __builtin_bit_cast(
|
|
130
|
+
double, __gpu_read_first_lane_u64(__lane_mask,
|
|
131
|
+
__builtin_bit_cast(uint64_t, __x)));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Shuffles the the lanes according to the given index.
|
|
135
|
+
_DEFAULT_FN_ATTRS static __inline__ float
|
|
136
|
+
__gpu_shuffle_idx_f32(uint64_t __lane_mask, uint32_t __idx, float __x,
|
|
137
|
+
uint32_t __width) {
|
|
138
|
+
return __builtin_bit_cast(
|
|
139
|
+
float, __gpu_shuffle_idx_u32(__lane_mask, __idx,
|
|
140
|
+
__builtin_bit_cast(uint32_t, __x), __width));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Shuffles the the lanes according to the given index.
|
|
144
|
+
_DEFAULT_FN_ATTRS static __inline__ double
|
|
145
|
+
__gpu_shuffle_idx_f64(uint64_t __lane_mask, uint32_t __idx, double __x,
|
|
146
|
+
uint32_t __width) {
|
|
147
|
+
return __builtin_bit_cast(
|
|
148
|
+
double,
|
|
149
|
+
__gpu_shuffle_idx_u64(__lane_mask, __idx,
|
|
150
|
+
__builtin_bit_cast(uint64_t, __x), __width));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Gets the accumulator scan of the threads in the warp or wavefront.
|
|
154
|
+
#define __DO_LANE_SCAN(__type, __bitmask_type, __suffix) \
|
|
155
|
+
_DEFAULT_FN_ATTRS static __inline__ uint32_t __gpu_lane_scan_##__suffix( \
|
|
156
|
+
uint64_t __lane_mask, uint32_t __x) { \
|
|
157
|
+
uint64_t __first = __lane_mask >> __builtin_ctzll(__lane_mask); \
|
|
158
|
+
bool __divergent = __gpu_read_first_lane_##__suffix( \
|
|
159
|
+
__lane_mask, __first & (__first + 1)); \
|
|
160
|
+
if (__divergent) { \
|
|
161
|
+
__type __accum = 0; \
|
|
162
|
+
for (uint64_t __mask = __lane_mask; __mask; __mask &= __mask - 1) { \
|
|
163
|
+
__type __index = __builtin_ctzll(__mask); \
|
|
164
|
+
__type __tmp = __gpu_shuffle_idx_##__suffix(__lane_mask, __index, __x, \
|
|
165
|
+
__gpu_num_lanes()); \
|
|
166
|
+
__x = __gpu_lane_id() == __index ? __accum + __tmp : __x; \
|
|
167
|
+
__accum += __tmp; \
|
|
168
|
+
} \
|
|
169
|
+
} else { \
|
|
170
|
+
for (uint32_t __step = 1; __step < __gpu_num_lanes(); __step *= 2) { \
|
|
171
|
+
uint32_t __index = __gpu_lane_id() - __step; \
|
|
172
|
+
__bitmask_type bitmask = __gpu_lane_id() >= __step; \
|
|
173
|
+
__x += __builtin_bit_cast( \
|
|
174
|
+
__type, \
|
|
175
|
+
-bitmask & __builtin_bit_cast(__bitmask_type, \
|
|
176
|
+
__gpu_shuffle_idx_##__suffix( \
|
|
177
|
+
__lane_mask, __index, __x, \
|
|
178
|
+
__gpu_num_lanes()))); \
|
|
179
|
+
} \
|
|
180
|
+
} \
|
|
181
|
+
return __x; \
|
|
182
|
+
}
|
|
183
|
+
__DO_LANE_SCAN(uint32_t, uint32_t, u32); // uint32_t __gpu_lane_scan_u32(m, x)
|
|
184
|
+
__DO_LANE_SCAN(uint64_t, uint64_t, u64); // uint64_t __gpu_lane_scan_u64(m, x)
|
|
185
|
+
__DO_LANE_SCAN(float, uint32_t, f32); // float __gpu_lane_scan_f32(m, x)
|
|
186
|
+
__DO_LANE_SCAN(double, uint64_t, f64); // double __gpu_lane_scan_f64(m, x)
|
|
187
|
+
#undef __DO_LANE_SCAN
|
|
188
|
+
|
|
189
|
+
// Gets the sum of all lanes inside the warp or wavefront.
|
|
190
|
+
#define __DO_LANE_SUM(__type, __suffix) \
|
|
191
|
+
_DEFAULT_FN_ATTRS static __inline__ __type __gpu_lane_sum_##__suffix( \
|
|
192
|
+
uint64_t __lane_mask, __type __x) { \
|
|
193
|
+
uint64_t __first = __lane_mask >> __builtin_ctzll(__lane_mask); \
|
|
194
|
+
bool __divergent = __gpu_read_first_lane_##__suffix( \
|
|
195
|
+
__lane_mask, __first & (__first + 1)); \
|
|
196
|
+
if (__divergent) { \
|
|
197
|
+
return __gpu_shuffle_idx_##__suffix( \
|
|
198
|
+
__lane_mask, 63 - __builtin_clzll(__lane_mask), \
|
|
199
|
+
__gpu_lane_scan_##__suffix(__lane_mask, __x), __gpu_num_lanes()); \
|
|
200
|
+
} else { \
|
|
201
|
+
for (uint32_t __step = 1; __step < __gpu_num_lanes(); __step *= 2) { \
|
|
202
|
+
uint32_t __index = __step + __gpu_lane_id(); \
|
|
203
|
+
__x += __gpu_shuffle_idx_##__suffix(__lane_mask, __index, __x, \
|
|
204
|
+
__gpu_num_lanes()); \
|
|
205
|
+
} \
|
|
206
|
+
return __gpu_read_first_lane_##__suffix(__lane_mask, __x); \
|
|
207
|
+
} \
|
|
208
|
+
}
|
|
209
|
+
__DO_LANE_SUM(uint32_t, u32); // uint32_t __gpu_lane_sum_u32(m, x)
|
|
210
|
+
__DO_LANE_SUM(uint64_t, u64); // uint64_t __gpu_lane_sum_u64(m, x)
|
|
211
|
+
__DO_LANE_SUM(float, f32); // float __gpu_lane_sum_f32(m, x)
|
|
212
|
+
__DO_LANE_SUM(double, f64); // double __gpu_lane_sum_f64(m, x)
|
|
213
|
+
#undef __DO_LANE_SUM
|
|
214
|
+
|
|
215
|
+
_Pragma("omp end declare variant");
|
|
216
|
+
_Pragma("omp end declare target");
|
|
217
|
+
|
|
218
|
+
#if !defined(__cplusplus)
|
|
219
|
+
_Pragma("pop_macro(\"bool\")");
|
|
220
|
+
#endif
|
|
221
|
+
|
|
222
|
+
#undef _DEFAULT_FN_ATTRS
|
|
223
|
+
|
|
224
|
+
#endif // __GPUINTRIN_H
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
|
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
|
+
|
|
5
9
|
#ifndef HEXAGON_TYPES_H
|
|
6
10
|
#define HEXAGON_TYPES_H
|
|
7
11
|
|
|
@@ -12,56 +12,109 @@
|
|
|
12
12
|
namespace hlsl {
|
|
13
13
|
// built-in scalar data types:
|
|
14
14
|
|
|
15
|
+
/// \typedef template<typename Ty, int Size> using vector = Ty
|
|
16
|
+
/// __attribute__((ext_vector_type(Size)))
|
|
17
|
+
///
|
|
18
|
+
/// \tparam Ty The base type of the vector may be any builtin integral or
|
|
19
|
+
/// floating point type.
|
|
20
|
+
/// \tparam Size The size of the vector may be any value between 1 and 4.
|
|
21
|
+
|
|
15
22
|
#ifdef __HLSL_ENABLE_16_BIT
|
|
16
23
|
// 16-bit integer.
|
|
17
24
|
typedef unsigned short uint16_t;
|
|
18
25
|
typedef short int16_t;
|
|
26
|
+
|
|
27
|
+
// 16-bit floating point.
|
|
28
|
+
typedef half float16_t;
|
|
19
29
|
#endif
|
|
20
30
|
|
|
31
|
+
// 32-bit integer.
|
|
32
|
+
typedef int int32_t;
|
|
33
|
+
|
|
21
34
|
// unsigned 32-bit integer.
|
|
22
35
|
typedef unsigned int uint;
|
|
36
|
+
typedef unsigned int uint32_t;
|
|
37
|
+
|
|
38
|
+
// 32-bit floating point.
|
|
39
|
+
typedef float float32_t;
|
|
23
40
|
|
|
24
41
|
// 64-bit integer.
|
|
25
42
|
typedef unsigned long uint64_t;
|
|
26
43
|
typedef long int64_t;
|
|
27
44
|
|
|
45
|
+
// 64-bit floating point
|
|
46
|
+
typedef double float64_t;
|
|
47
|
+
|
|
28
48
|
// built-in vector data types:
|
|
29
49
|
|
|
30
50
|
#ifdef __HLSL_ENABLE_16_BIT
|
|
51
|
+
typedef vector<int16_t, 1> int16_t1;
|
|
31
52
|
typedef vector<int16_t, 2> int16_t2;
|
|
32
53
|
typedef vector<int16_t, 3> int16_t3;
|
|
33
54
|
typedef vector<int16_t, 4> int16_t4;
|
|
55
|
+
typedef vector<uint16_t, 1> uint16_t1;
|
|
34
56
|
typedef vector<uint16_t, 2> uint16_t2;
|
|
35
57
|
typedef vector<uint16_t, 3> uint16_t3;
|
|
36
58
|
typedef vector<uint16_t, 4> uint16_t4;
|
|
37
59
|
#endif
|
|
38
|
-
|
|
60
|
+
typedef vector<bool, 1> bool1;
|
|
61
|
+
typedef vector<bool, 2> bool2;
|
|
62
|
+
typedef vector<bool, 3> bool3;
|
|
63
|
+
typedef vector<bool, 4> bool4;
|
|
64
|
+
typedef vector<int, 1> int1;
|
|
39
65
|
typedef vector<int, 2> int2;
|
|
40
66
|
typedef vector<int, 3> int3;
|
|
41
67
|
typedef vector<int, 4> int4;
|
|
68
|
+
typedef vector<uint, 1> uint1;
|
|
42
69
|
typedef vector<uint, 2> uint2;
|
|
43
70
|
typedef vector<uint, 3> uint3;
|
|
44
71
|
typedef vector<uint, 4> uint4;
|
|
72
|
+
typedef vector<int32_t, 1> int32_t1;
|
|
73
|
+
typedef vector<int32_t, 2> int32_t2;
|
|
74
|
+
typedef vector<int32_t, 3> int32_t3;
|
|
75
|
+
typedef vector<int32_t, 4> int32_t4;
|
|
76
|
+
typedef vector<uint32_t, 1> uint32_t1;
|
|
77
|
+
typedef vector<uint32_t, 2> uint32_t2;
|
|
78
|
+
typedef vector<uint32_t, 3> uint32_t3;
|
|
79
|
+
typedef vector<uint32_t, 4> uint32_t4;
|
|
80
|
+
typedef vector<int64_t, 1> int64_t1;
|
|
45
81
|
typedef vector<int64_t, 2> int64_t2;
|
|
46
82
|
typedef vector<int64_t, 3> int64_t3;
|
|
47
83
|
typedef vector<int64_t, 4> int64_t4;
|
|
84
|
+
typedef vector<uint64_t, 1> uint64_t1;
|
|
48
85
|
typedef vector<uint64_t, 2> uint64_t2;
|
|
49
86
|
typedef vector<uint64_t, 3> uint64_t3;
|
|
50
87
|
typedef vector<uint64_t, 4> uint64_t4;
|
|
51
88
|
|
|
52
|
-
|
|
89
|
+
typedef vector<half, 1> half1;
|
|
53
90
|
typedef vector<half, 2> half2;
|
|
54
91
|
typedef vector<half, 3> half3;
|
|
55
92
|
typedef vector<half, 4> half4;
|
|
56
|
-
|
|
57
|
-
|
|
93
|
+
typedef vector<float, 1> float1;
|
|
58
94
|
typedef vector<float, 2> float2;
|
|
59
95
|
typedef vector<float, 3> float3;
|
|
60
96
|
typedef vector<float, 4> float4;
|
|
97
|
+
typedef vector<double, 1> double1;
|
|
61
98
|
typedef vector<double, 2> double2;
|
|
62
99
|
typedef vector<double, 3> double3;
|
|
63
100
|
typedef vector<double, 4> double4;
|
|
64
101
|
|
|
102
|
+
#ifdef __HLSL_ENABLE_16_BIT
|
|
103
|
+
typedef vector<float16_t, 1> float16_t1;
|
|
104
|
+
typedef vector<float16_t, 2> float16_t2;
|
|
105
|
+
typedef vector<float16_t, 3> float16_t3;
|
|
106
|
+
typedef vector<float16_t, 4> float16_t4;
|
|
107
|
+
#endif
|
|
108
|
+
|
|
109
|
+
typedef vector<float32_t, 1> float32_t1;
|
|
110
|
+
typedef vector<float32_t, 2> float32_t2;
|
|
111
|
+
typedef vector<float32_t, 3> float32_t3;
|
|
112
|
+
typedef vector<float32_t, 4> float32_t4;
|
|
113
|
+
typedef vector<float64_t, 1> float64_t1;
|
|
114
|
+
typedef vector<float64_t, 2> float64_t2;
|
|
115
|
+
typedef vector<float64_t, 3> float64_t3;
|
|
116
|
+
typedef vector<float64_t, 4> float64_t4;
|
|
117
|
+
|
|
65
118
|
} // namespace hlsl
|
|
66
119
|
|
|
67
120
|
#endif //_HLSL_HLSL_BASIC_TYPES_H_
|