| 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 |
| 11 |
#define _LIBCPP_EXPERIMENTAL_SIMD |
| 12 |
|
| 13 |
/* |
| 14 |
experimental/simd synopsis |
| 15 |
|
| 16 |
namespace std::experimental { |
| 17 |
inline namespace parallelism_v2 { |
| 18 |
namespace simd_abi { |
| 19 |
using scalar = see below; |
| 20 |
template<int N> using fixed_size = see below; |
| 21 |
template<class T> inline constexpr int max_fixed_size = implementation-defined; |
| 22 |
template<class T> using compatible = implementation-defined; |
| 23 |
template<class T> using native = implementation-defined; |
| 24 |
|
| 25 |
template<class T, size_t N, class... Abis> struct deduce { using type = see below; }; |
| 26 |
template<class T, size_t N, class... Abis> using deduce_t = |
| 27 |
typename deduce<T, N, Abis...>::type; |
| 28 |
} // namespace simd_abi |
| 29 |
|
| 30 |
// class template simd [simd.class] |
| 31 |
template <class T, class Abi = simd_abi::compatible<T>> class simd; |
| 32 |
template <class T> using native_simd = simd<T, simd_abi::native<T>>; |
| 33 |
template <class T, int N> using fixed_size_simd = simd<T, simd_abi::fixed_size<N>>; |
| 34 |
|
| 35 |
// class template simd_mask [simd.mask.class] |
| 36 |
template <class T, class Abi = simd_abi::compatible<T>> class simd_mask; |
| 37 |
template <class T> using native_simd_mask = simd_mask<T, simd_abi::native<T>>; |
| 38 |
template <class T, int N> using fixed_size_simd_mask = simd_mask<T, simd_abi::fixed_size<N>>; |
| 39 |
|
| 40 |
// memory alignment |
| 41 |
struct element_aligned_tag {}; |
| 42 |
struct vector_aligned_tag {}; |
| 43 |
template <size_t> struct overaligned_tag {}; |
| 44 |
inline constexpr element_aligned_tag element_aligned{}; |
| 45 |
inline constexpr vector_aligned_tag vector_aligned{}; |
| 46 |
template <size_t N> inline constexpr overaligned_tag<N> overaligned{}; |
| 47 |
|
| 48 |
// traits [simd.traits] |
| 49 |
template<class T> struct is_abi_tag; |
| 50 |
template<class T> inline constexpr bool is_abi_tag_v = is_abi_tag<T>::value; |
| 51 |
|
| 52 |
template <class T> struct is_simd; |
| 53 |
template <class T> inline constexpr bool is_simd_v = is_simd<T>::value; |
| 54 |
|
| 55 |
template <class T> struct is_simd_mask; |
| 56 |
template <class T> inline constexpr bool is_simd_mask_v = is_simd_mask<T>::value; |
| 57 |
|
| 58 |
template<class T> struct is_simd_flag_type; |
| 59 |
template<class T> inline constexpr bool is_simd_flag_type_v = is_simd_flag_type<T>::value; |
| 60 |
|
| 61 |
template<class T, class Abi = simd_abi::compatible<T>> struct simd_size; |
| 62 |
template<class T, class Abi = simd_abi::compatible<T>> |
| 63 |
inline constexpr size_t simd_size_v = simd_size<T,Abi>::value; |
| 64 |
|
| 65 |
template<class T, class U = typename T::value_type> struct memory_alignment; |
| 66 |
template<class T, class U = typename T::value_type> |
| 67 |
inline constexpr size_t memory_alignment_v = memory_alignment<T,U>::value; |
| 68 |
|
| 69 |
} // namespace parallelism_v2 |
| 70 |
} // namespace std::experimental |
| 71 |
|
| 72 |
*/ |
| 73 |
|
| 74 |
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 75 |
# pragma GCC system_header |
| 76 |
#endif |
| 77 |
|
| 78 |
#include <experimental/__config> |
| 79 |
#include <experimental/__simd/aligned_tag.h> |
| 80 |
#include <experimental/__simd/declaration.h> |
| 81 |
#include <experimental/__simd/reference.h> |
| 82 |
#include <experimental/__simd/scalar.h> |
| 83 |
#include <experimental/__simd/simd.h> |
| 84 |
#include <experimental/__simd/simd_mask.h> |
| 85 |
#include <experimental/__simd/traits.h> |
| 86 |
#include <experimental/__simd/vec_ext.h> |
| 87 |
|
| 88 |
#endif /* _LIBCPP_EXPERIMENTAL_SIMD */ |