|
10 | 10 | #ifndef _LIBCPP_EXPERIMENTAL___SIMD_DECLARATION_H
|
11 | 11 | #define _LIBCPP_EXPERIMENTAL___SIMD_DECLARATION_H
|
12 | 12 |
|
| 13 | +#include <cstddef> |
13 | 14 | #include <experimental/__config>
|
14 |
| -#include <experimental/__simd/abi_tag.h> |
15 | 15 |
|
16 | 16 | #if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
|
17 | 17 |
|
18 | 18 | _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
|
19 | 19 | inline namespace parallelism_v2 {
|
| 20 | +namespace simd_abi { |
| 21 | +template <int> |
| 22 | +struct __vec_ext; |
| 23 | +struct __scalar; |
| 24 | + |
| 25 | +using scalar = __scalar; |
| 26 | + |
| 27 | +// TODO: make this platform dependent |
| 28 | +template <int _Np> |
| 29 | +using fixed_size = __vec_ext<_Np>; |
| 30 | + |
| 31 | +template <class _Tp> |
| 32 | +inline constexpr int max_fixed_size = 32; |
| 33 | + |
| 34 | +// TODO: make this platform dependent |
| 35 | +template <class _Tp> |
| 36 | +using compatible = __vec_ext<16 / sizeof(_Tp)>; |
| 37 | + |
| 38 | +// TODO: make this platform dependent |
| 39 | +template <class _Tp> |
| 40 | +using native = __vec_ext<_LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES / sizeof(_Tp)>; |
| 41 | + |
| 42 | +// TODO: make this platform dependent |
| 43 | +template <class _Tp, size_t _Np, class... _Abis> |
| 44 | +struct deduce { |
| 45 | + using type = fixed_size<_Np>; |
| 46 | +}; |
| 47 | + |
| 48 | +// TODO: make this platform dependent |
| 49 | +template <class _Tp, size_t _Np, class... _Abis> |
| 50 | +using deduce_t = typename deduce<_Tp, _Np, _Abis...>::type; |
| 51 | + |
| 52 | +} // namespace simd_abi |
| 53 | + |
| 54 | +template <class _Tp, class _Abi> |
| 55 | +struct __simd_storage; |
| 56 | + |
| 57 | +template <class _Tp, class _Abi> |
| 58 | +struct __mask_storage; |
| 59 | + |
| 60 | +template <class _Tp, class _Abi> |
| 61 | +struct __simd_operations; |
| 62 | + |
| 63 | +template <class _Tp, class _Abi> |
| 64 | +struct __mask_operations; |
| 65 | + |
| 66 | +struct element_aligned_tag; |
| 67 | +struct vector_aligned_tag; |
| 68 | +template <size_t> |
| 69 | +struct overaligned_tag; |
20 | 70 |
|
21 | 71 | template <class _Tp, class _Abi = simd_abi::compatible<_Tp>>
|
22 | 72 | class simd;
|
|
0 commit comments