1 // -*- C++ -*- 2 //===----------------------------------------------------------------------===// 3 // 4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 // See https://llvm.org/LICENSE.txt for license information. 6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef _LIBCPP_EXPERIMENTAL___SIMD_ABI_TAG_H 11 #define _LIBCPP_EXPERIMENTAL___SIMD_ABI_TAG_H 12 13 #include <cstddef> 14 #include <experimental/__config> 15 #include <experimental/__simd/internal_declaration.h> 16 17 #if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) 18 19 _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL 20 inline namespace parallelism_v2 { 21 namespace simd_abi { 22 23 using scalar = __scalar; 24 25 // TODO: make this platform dependent 26 template <int _Np> 27 using fixed_size = __vec_ext<_Np>; 28 29 template <class _Tp> 30 inline constexpr int max_fixed_size = 32; 31 32 // TODO: make this platform dependent 33 template <class _Tp> 34 using compatible = __vec_ext<16 / sizeof(_Tp)>; 35 36 // TODO: make this platform dependent 37 template <class _Tp> 38 using native = __vec_ext<_LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES / sizeof(_Tp)>; 39 40 // TODO: make this platform dependent 41 template <class _Tp, size_t _Np, class... _Abis> 42 struct deduce { 43 using type = fixed_size<_Np>; 44 }; 45 46 // TODO: make this platform dependent 47 template <class _Tp, size_t _Np, class... _Abis> 48 using deduce_t = typename deduce<_Tp, _Np, _Abis...>::type; 49 50 } // namespace simd_abi 51 } // namespace parallelism_v2 52 _LIBCPP_END_NAMESPACE_EXPERIMENTAL 53 54 #endif // _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) 55 #endif // _LIBCPP_EXPERIMENTAL___SIMD_ABI_TAG_H 56