Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-03 08:13:45

0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef _LIBCPP___CXX03_EXPERIMENTAL___SIMD_DECLARATION_H
0011 #define _LIBCPP___CXX03_EXPERIMENTAL___SIMD_DECLARATION_H
0012 
0013 #include <__cxx03/cstddef>
0014 #include <__cxx03/experimental/__config>
0015 
0016 #if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
0017 
0018 _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
0019 inline namespace parallelism_v2 {
0020 namespace simd_abi {
0021 template <int>
0022 struct __vec_ext;
0023 struct __scalar;
0024 
0025 using scalar = __scalar;
0026 
0027 // TODO: make this platform dependent
0028 template <int _Np>
0029 using fixed_size = __vec_ext<_Np>;
0030 
0031 template <class _Tp>
0032 inline constexpr int max_fixed_size = 32;
0033 
0034 // TODO: make this platform dependent
0035 template <class _Tp>
0036 using compatible = __vec_ext<16 / sizeof(_Tp)>;
0037 
0038 // TODO: make this platform dependent
0039 template <class _Tp>
0040 using native = __vec_ext<_LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES / sizeof(_Tp)>;
0041 
0042 // TODO: make this platform dependent
0043 template <class _Tp, size_t _Np, class... _Abis>
0044 struct deduce {
0045   using type = fixed_size<_Np>;
0046 };
0047 
0048 // TODO: make this platform dependent
0049 template <class _Tp, size_t _Np, class... _Abis>
0050 using deduce_t = typename deduce<_Tp, _Np, _Abis...>::type;
0051 
0052 } // namespace simd_abi
0053 
0054 template <class _Tp, class _Abi>
0055 struct __simd_storage;
0056 
0057 template <class _Tp, class _Abi>
0058 struct __mask_storage;
0059 
0060 template <class _Tp, class _Abi>
0061 struct __simd_operations;
0062 
0063 template <class _Tp, class _Abi>
0064 struct __mask_operations;
0065 
0066 struct element_aligned_tag;
0067 struct vector_aligned_tag;
0068 template <size_t>
0069 struct overaligned_tag;
0070 
0071 template <class _Tp, class _Abi = simd_abi::compatible<_Tp>>
0072 class simd;
0073 
0074 template <class _Tp, class _Abi = simd_abi::compatible<_Tp>>
0075 class simd_mask;
0076 
0077 } // namespace parallelism_v2
0078 _LIBCPP_END_NAMESPACE_EXPERIMENTAL
0079 
0080 #endif // _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
0081 #endif // _LIBCPP___CXX03_EXPERIMENTAL___SIMD_DECLARATION_H