10b57cec5SDimitry Andric// -*- C++ -*- 2349cc55cSDimitry Andric//===----------------------------------------------------------------------===// 30b57cec5SDimitry Andric// 40b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 50b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 60b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 70b57cec5SDimitry Andric// 80b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 9bdd1243dSDimitry Andric 100b57cec5SDimitry Andric#ifndef _LIBCPP_EXPERIMENTAL_SIMD 110b57cec5SDimitry Andric#define _LIBCPP_EXPERIMENTAL_SIMD 120b57cec5SDimitry Andric 130b57cec5SDimitry Andric/* 140b57cec5SDimitry Andric experimental/simd synopsis 150b57cec5SDimitry Andric 160b57cec5SDimitry Andricnamespace std::experimental { 170b57cec5SDimitry Andricinline namespace parallelism_v2 { 180b57cec5SDimitry Andric namespace simd_abi { 195f757f3fSDimitry Andric using scalar = see below; 205f757f3fSDimitry Andric template<int N> using fixed_size = see below; 215f757f3fSDimitry Andric template<class T> inline constexpr int max_fixed_size = implementation-defined; 225f757f3fSDimitry Andric template<class T> using compatible = implementation-defined; 235f757f3fSDimitry Andric template<class T> using native = implementation-defined; 240b57cec5SDimitry Andric 255f757f3fSDimitry Andric template<class T, size_t N, class... Abis> struct deduce { using type = see below; }; 265f757f3fSDimitry Andric template<class T, size_t N, class... Abis> using deduce_t = 275f757f3fSDimitry Andric typename deduce<T, N, Abis...>::type; 285f757f3fSDimitry Andric } // namespace simd_abi 290b57cec5SDimitry Andric 305f757f3fSDimitry Andric // class template simd [simd.class] 315f757f3fSDimitry Andric template <class T, class Abi = simd_abi::compatible<T>> class simd; 325f757f3fSDimitry Andric template <class T> using native_simd = simd<T, simd_abi::native<T>>; 335f757f3fSDimitry Andric template <class T, int N> using fixed_size_simd = simd<T, simd_abi::fixed_size<N>>; 340b57cec5SDimitry Andric 355f757f3fSDimitry Andric // class template simd_mask [simd.mask.class] 365f757f3fSDimitry Andric template <class T, class Abi = simd_abi::compatible<T>> class simd_mask; 375f757f3fSDimitry Andric template <class T> using native_simd_mask = simd_mask<T, simd_abi::native<T>>; 385f757f3fSDimitry Andric template <class T, int N> using fixed_size_simd_mask = simd_mask<T, simd_abi::fixed_size<N>>; 395f757f3fSDimitry Andric 405f757f3fSDimitry Andric // memory alignment 410b57cec5SDimitry Andric struct element_aligned_tag {}; 420b57cec5SDimitry Andric struct vector_aligned_tag {}; 430b57cec5SDimitry Andric template <size_t> struct overaligned_tag {}; 440b57cec5SDimitry Andric inline constexpr element_aligned_tag element_aligned{}; 450b57cec5SDimitry Andric inline constexpr vector_aligned_tag vector_aligned{}; 460b57cec5SDimitry Andric template <size_t N> inline constexpr overaligned_tag<N> overaligned{}; 470b57cec5SDimitry Andric 480b57cec5SDimitry Andric // traits [simd.traits] 490b57cec5SDimitry Andric template<class T> struct is_abi_tag; 500b57cec5SDimitry Andric template<class T> inline constexpr bool is_abi_tag_v = is_abi_tag<T>::value; 510b57cec5SDimitry Andric 520b57cec5SDimitry Andric template <class T> struct is_simd; 530b57cec5SDimitry Andric template <class T> inline constexpr bool is_simd_v = is_simd<T>::value; 540b57cec5SDimitry Andric 550b57cec5SDimitry Andric template <class T> struct is_simd_mask; 560b57cec5SDimitry Andric template <class T> inline constexpr bool is_simd_mask_v = is_simd_mask<T>::value; 570b57cec5SDimitry Andric 580b57cec5SDimitry Andric template<class T> struct is_simd_flag_type; 590b57cec5SDimitry Andric template<class T> inline constexpr bool is_simd_flag_type_v = is_simd_flag_type<T>::value; 600b57cec5SDimitry Andric 610b57cec5SDimitry Andric template<class T, class Abi = simd_abi::compatible<T>> struct simd_size; 620b57cec5SDimitry Andric template<class T, class Abi = simd_abi::compatible<T>> 630b57cec5SDimitry Andric inline constexpr size_t simd_size_v = simd_size<T,Abi>::value; 640b57cec5SDimitry Andric 650b57cec5SDimitry Andric template<class T, class U = typename T::value_type> struct memory_alignment; 660b57cec5SDimitry Andric template<class T, class U = typename T::value_type> 670b57cec5SDimitry Andric inline constexpr size_t memory_alignment_v = memory_alignment<T,U>::value; 680b57cec5SDimitry Andric 695f757f3fSDimitry Andric} // namespace parallelism_v2 705f757f3fSDimitry Andric} // namespace std::experimental 710b57cec5SDimitry Andric 720b57cec5SDimitry Andric*/ 730b57cec5SDimitry Andric 740b57cec5SDimitry Andric#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 750b57cec5SDimitry Andric# pragma GCC system_header 760b57cec5SDimitry Andric#endif 770b57cec5SDimitry Andric 785f757f3fSDimitry Andric#include <experimental/__config> 795f757f3fSDimitry Andric#include <experimental/__simd/aligned_tag.h> 805f757f3fSDimitry Andric#include <experimental/__simd/declaration.h> 81*0fca6ea1SDimitry Andric#include <experimental/__simd/reference.h> 825f757f3fSDimitry Andric#include <experimental/__simd/scalar.h> 835f757f3fSDimitry Andric#include <experimental/__simd/simd.h> 845f757f3fSDimitry Andric#include <experimental/__simd/simd_mask.h> 855f757f3fSDimitry Andric#include <experimental/__simd/traits.h> 865f757f3fSDimitry Andric#include <experimental/__simd/vec_ext.h> 87bdd1243dSDimitry Andric 880b57cec5SDimitry Andric#endif /* _LIBCPP_EXPERIMENTAL_SIMD */ 89