brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.7 KiB · 2e1c781 Raw
97 lines · plain
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-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCPP_EXPERIMENTAL_SIMD11#define _LIBCPP_EXPERIMENTAL_SIMD12 13/*14    experimental/simd synopsis15 16namespace std::experimental {17inline 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_abi29 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 alignment41  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_v270} // namespace std::experimental71 72*/73 74#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)75#  pragma GCC system_header76#endif77 78#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)79#  include <__cxx03/__config>80#else81#  include <__config>82#  include <experimental/__simd/aligned_tag.h>83#  include <experimental/__simd/declaration.h>84#  include <experimental/__simd/reference.h>85#  include <experimental/__simd/scalar.h>86#  include <experimental/__simd/simd.h>87#  include <experimental/__simd/simd_mask.h>88#  include <experimental/__simd/traits.h>89#  include <experimental/__simd/vec_ext.h>90 91#  if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 2092#    include <cstddef>93#  endif94#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)95 96#endif /* _LIBCPP_EXPERIMENTAL_SIMD */97