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