1*b1e83836Smrg// Components for element-wise operations on data-parallel objects -*- C++ -*- 2*b1e83836Smrg 3*b1e83836Smrg// Copyright (C) 2020-2022 Free Software Foundation, Inc. 4*b1e83836Smrg// 5*b1e83836Smrg// This file is part of the GNU ISO C++ Library. This library is free 6*b1e83836Smrg// software; you can redistribute it and/or modify it under the 7*b1e83836Smrg// terms of the GNU General Public License as published by the 8*b1e83836Smrg// Free Software Foundation; either version 3, or (at your option) 9*b1e83836Smrg// any later version. 10*b1e83836Smrg 11*b1e83836Smrg// This library is distributed in the hope that it will be useful, 12*b1e83836Smrg// but WITHOUT ANY WARRANTY; without even the implied warranty of 13*b1e83836Smrg// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*b1e83836Smrg// GNU General Public License for more details. 15*b1e83836Smrg 16*b1e83836Smrg// Under Section 7 of GPL version 3, you are granted additional 17*b1e83836Smrg// permissions described in the GCC Runtime Library Exception, version 18*b1e83836Smrg// 3.1, as published by the Free Software Foundation. 19*b1e83836Smrg 20*b1e83836Smrg// You should have received a copy of the GNU General Public License and 21*b1e83836Smrg// a copy of the GCC Runtime Library Exception along with this program; 22*b1e83836Smrg// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23*b1e83836Smrg// <http://www.gnu.org/licenses/>. 24*b1e83836Smrg 25*b1e83836Smrg/** @file experimental/simd 26*b1e83836Smrg * This is a TS C++ Library header. 27*b1e83836Smrg */ 28*b1e83836Smrg 29*b1e83836Smrg// 30*b1e83836Smrg// N4773 §9 data-parallel types library 31*b1e83836Smrg// 32*b1e83836Smrg 33*b1e83836Smrg#ifndef _GLIBCXX_EXPERIMENTAL_SIMD 34*b1e83836Smrg#define _GLIBCXX_EXPERIMENTAL_SIMD 35*b1e83836Smrg 36*b1e83836Smrg#if __cplusplus >= 201703L 37*b1e83836Smrg 38*b1e83836Smrg/** @defgroup par-ts Parallelism TS 39*b1e83836Smrg * @ingroup experimental 40*b1e83836Smrg * 41*b1e83836Smrg * Components defined by the _C++ Extensions for Parallelism_ 42*b1e83836Smrg * Technical Specification. 43*b1e83836Smrg * 44*b1e83836Smrg * - ISO/IEC TS 19570:2015 C++ Extensions for Parallelism 45*b1e83836Smrg * - ISO/IEC TS 19570:2018 C++ Extensions for Parallelism, Version 2 46*b1e83836Smrg */ 47*b1e83836Smrg 48*b1e83836Smrg/** @defgroup ts_simd Data parallel extensions 49*b1e83836Smrg * @ingroup par-ts 50*b1e83836Smrg * 51*b1e83836Smrg * Data-parallel types library. 52*b1e83836Smrg * @since C++17 53*b1e83836Smrg */ 54*b1e83836Smrg/// @ingroup ts_simd 55*b1e83836Smrg#define __cpp_lib_experimental_parallel_simd 201803 56*b1e83836Smrg 57*b1e83836Smrg#pragma GCC diagnostic push 58*b1e83836Smrg// Many [[gnu::vector_size(N)]] types might lead to a -Wpsabi warning which is 59*b1e83836Smrg// irrelevant as those functions never appear on ABI borders 60*b1e83836Smrg#ifndef __clang__ 61*b1e83836Smrg#pragma GCC diagnostic ignored "-Wpsabi" 62*b1e83836Smrg#endif 63*b1e83836Smrg 64*b1e83836Smrg// If __OPTIMIZE__ is not defined some intrinsics are defined as macros, making 65*b1e83836Smrg// use of C casts internally. This requires us to disable the warning as it 66*b1e83836Smrg// would otherwise yield many false positives. 67*b1e83836Smrg#ifndef __OPTIMIZE__ 68*b1e83836Smrg#pragma GCC diagnostic ignored "-Wold-style-cast" 69*b1e83836Smrg#endif 70*b1e83836Smrg 71*b1e83836Smrg#include "bits/simd_detail.h" 72*b1e83836Smrg#include "bits/simd.h" 73*b1e83836Smrg#include "bits/simd_fixed_size.h" 74*b1e83836Smrg#include "bits/simd_scalar.h" 75*b1e83836Smrg#include "bits/simd_builtin.h" 76*b1e83836Smrg#include "bits/simd_converter.h" 77*b1e83836Smrg#if _GLIBCXX_SIMD_X86INTRIN 78*b1e83836Smrg#include "bits/simd_x86.h" 79*b1e83836Smrg#elif _GLIBCXX_SIMD_HAVE_NEON 80*b1e83836Smrg#include "bits/simd_neon.h" 81*b1e83836Smrg#elif __ALTIVEC__ 82*b1e83836Smrg#include "bits/simd_ppc.h" 83*b1e83836Smrg#endif 84*b1e83836Smrg#include "bits/simd_math.h" 85*b1e83836Smrg 86*b1e83836Smrg#pragma GCC diagnostic pop 87*b1e83836Smrg 88*b1e83836Smrg#endif // C++17 89*b1e83836Smrg#endif // _GLIBCXX_EXPERIMENTAL_SIMD 90*b1e83836Smrg// vim: ft=cpp 91