diff options
author | Matthias Kretz <m.kretz@gsi.de> | 2023-02-02 12:26:35 +0100 |
---|---|---|
committer | Matthias Kretz <m.kretz@gsi.de> | 2023-02-16 15:58:33 +0100 |
commit | 073df3e73f3080aee836c538b058180405f9dcd2 (patch) | |
tree | 4ebc6a8b9edb672181bd64d7d0a1613282a84a29 /libstdc++-v3 | |
parent | b0f4b166ada3b92da5f2917ac3f4397e99d1b58f (diff) | |
download | gcc-073df3e73f3080aee836c538b058180405f9dcd2.zip gcc-073df3e73f3080aee836c538b058180405f9dcd2.tar.gz gcc-073df3e73f3080aee836c538b058180405f9dcd2.tar.bz2 |
libstdc++: Use a PCH to speed up check-simd
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:
* testsuite/experimental/simd/generate_makefile.sh: Generate and
pre-compile pch.h, which includes all headers that do not depend
on command-line macros.
* testsuite/experimental/simd/tests/bits/main.h: New file.
(iterate_abis, main): Moved from verify.h.
* testsuite/experimental/simd/tests/bits/verify.h
(iterate_abis, main): Moved to main.h.
* testsuite/experimental/simd/tests/bits/conversions.h: Add
include guard.
(genHalfBits): Simplify.
* testsuite/experimental/simd/tests/bits/make_vec.h: Add include
guard.
(make_alternating_mask): Moved from mask_loadstore.
* testsuite/experimental/simd/tests/bits/mathreference.h: Add
include guard.
* testsuite/experimental/simd/tests/bits/test_values.h: Ditto.
* testsuite/experimental/simd/tests/mask_loadstore.cc
(make_mask, make_alternating_mask): Removed.
* testsuite/experimental/simd/tests/mask_reductions.cc: Ditto.
* testsuite/experimental/simd/tests/operators.cc (genHalfBits):
Removed.
* testsuite/experimental/simd/tests/abs.cc: Only include
bits/main.h.
Ditto.
* testsuite/experimental/simd/tests/algorithms.cc: Ditto.
* testsuite/experimental/simd/tests/broadcast.cc: Ditto.
* testsuite/experimental/simd/tests/casts.cc: Ditto.
* testsuite/experimental/simd/tests/fpclassify.cc: Ditto.
* testsuite/experimental/simd/tests/frexp.cc: Ditto.
* testsuite/experimental/simd/tests/generator.cc: Ditto.
* testsuite/experimental/simd/tests/hypot3_fma.cc: Ditto.
* testsuite/experimental/simd/tests/integer_operators.cc: Ditto.
* testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc:
* testsuite/experimental/simd/tests/loadstore.cc: Ditto.
* testsuite/experimental/simd/tests/logarithm.cc: Ditto.
* testsuite/experimental/simd/tests/mask_broadcast.cc: Ditto.
* testsuite/experimental/simd/tests/mask_conversions.cc: Ditto.
* testsuite/experimental/simd/tests/mask_implicit_cvt.cc: Ditto.
* testsuite/experimental/simd/tests/mask_operator_cvt.cc: Ditto.
* testsuite/experimental/simd/tests/mask_operators.cc: Ditto.
* testsuite/experimental/simd/tests/math_1arg.cc: Ditto.
* testsuite/experimental/simd/tests/math_2arg.cc: Ditto.
* testsuite/experimental/simd/tests/operator_cvt.cc: Ditto.
* testsuite/experimental/simd/tests/reductions.cc: Ditto.
* testsuite/experimental/simd/tests/remqo.cc: Ditto.
* testsuite/experimental/simd/tests/simd.cc: Ditto.
* testsuite/experimental/simd/tests/sincos.cc: Ditto.
* testsuite/experimental/simd/tests/split_concat.cc: Ditto.
* testsuite/experimental/simd/tests/splits.cc: Ditto.
* testsuite/experimental/simd/tests/trigonometric.cc: Ditto.
* testsuite/experimental/simd/tests/trunc_ceil_floor.cc: Ditto.
* testsuite/experimental/simd/tests/where.cc: Ditto.
Diffstat (limited to 'libstdc++-v3')
39 files changed, 170 insertions, 226 deletions
diff --git a/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh b/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh index ce5162a..9fb33e4 100755 --- a/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh +++ b/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh @@ -75,6 +75,7 @@ while [ $# -gt 0 ]; do done mkdir -p "$dst" +pch="$dst/pch.h" dst="$dst/Makefile" if [ -f "$dst" ]; then echo "Error: $dst already exists. Aborting." 1>&2 @@ -84,9 +85,23 @@ fi CXX="$1" shift +cat >> "$pch" <<EOF +#ifndef SIMD_PCH_ +#define SIMD_PCH_ +#include "${srcdir}/bits/verify.h" +#include "${srcdir}/bits/make_vec.h" +#include "${srcdir}/bits/mathreference.h" +#include "${srcdir}/bits/metahelpers.h" +#include "${srcdir}/bits/simd_view.h" +#include "${srcdir}/bits/test_values.h" +#include "${srcdir}/bits/ulp.h" +#include "${srcdir}/bits/conversions.h" +#endif // SIMD_PCH_ +EOF + echo "TESTFLAGS ?=" > "$dst" echo "test_flags := $testflags \$(TESTFLAGS)" >> "$dst" -echo CXXFLAGS = "$@" "\$(test_flags)" >> "$dst" +echo CXXFLAGS = "$@" -include pch.h "\$(test_flags)" >> "$dst" [ -n "$sim" ] && echo "export GCC_TEST_SIMULATOR = $sim" >> "$dst" cat >> "$dst" <<EOF srcdir = ${srcdir} @@ -94,9 +109,14 @@ CXX = ${CXX} DRIVER = ${driver} DRIVEROPTS ?= driveroptions := \$(DRIVEROPTS) +PCH_DEPS := \$(shell \$(CXX) \$(CXXFLAGS) -M pch.h | sed -e 's/^.*://' -e 's/\\\\//g') all: simd_testsuite.sum +pch.h.gch: \$(PCH_DEPS) + @echo "Preparing pre-compiled header" + @\$(CXX) \$(CXXFLAGS) -c \$< -o \$@ + simd_testsuite.sum: .progress .progress_total simd_testsuite.log @printf "\n\t\t=== simd_testsuite \$(test_flags) Summary ===\n\n"\\ "# of expected passes:\t\t\$(shell grep -c '^PASS:' \$@)\n"\\ @@ -247,7 +267,7 @@ EOF EOF for i in $(seq 0 9); do cat <<EOF -%-$type-$i.log: \$(srcdir)/%.cc +%-$type-$i.log: pch.h.gch \$(srcdir)/%.cc @\$(DRIVER) \$(driveroptions) -t "$t" -a $i -n \$* \$(CXX) \$(CXXFLAGS) EOF diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/abs.cc b/libstdc++-v3/testsuite/experimental/simd/tests/abs.cc index 2a0716e..53cc668 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/abs.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/abs.cc @@ -16,11 +16,9 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" #include <cmath> // abs & sqrt #include <cstdlib> // integer abs -#include "bits/test_values.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/algorithms.cc b/libstdc++-v3/testsuite/experimental/simd/tests/algorithms.cc index dac0981..6242eb8 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/algorithms.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/algorithms.cc @@ -16,8 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/conversions.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/conversions.h index 2b12de6..7bd70ce 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/bits/conversions.h +++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/conversions.h @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. +#ifndef SIMD_TESTS_BITS_CONVERSIONS_H_ +#define SIMD_TESTS_BITS_CONVERSIONS_H_ #include <array> // is_conversion_undefined @@ -86,22 +88,12 @@ template <typename To, typename T, typename A> template <class T> constexpr T genHalfBits() - { return std::__finite_max_v<T> >> (std::__digits_v<T> / 2); } - -template <> - constexpr long double - genHalfBits<long double>() - { return 0; } - -template <> - constexpr double - genHalfBits<double>() - { return 0; } - -template <> - constexpr float - genHalfBits<float>() - { return 0; } + { + if constexpr (std::is_floating_point_v<T>) + return 0; + else + return std::__finite_max_v<T> >> (std::__digits_v<T> / 2); + } template <class U, class T, class UU> constexpr U @@ -182,3 +174,4 @@ template <class T, class U> operator[](size_t i) const { return cvt_input_data<U, T>[i]; } }; +#endif // SIMD_TESTS_BITS_CONVERSIONS_H_ diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/main.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/main.h new file mode 100644 index 0000000..270b433 --- /dev/null +++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/main.h @@ -0,0 +1,87 @@ +// Copyright (C) 2020-2023 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#ifndef TESTS_BITS_MAIN_H_ +#define TESTS_BITS_MAIN_H_ + +#include "verify.h" + +template <class T> + void + iterate_abis() + { + using namespace std::experimental::parallelism_v2; +#ifndef EXTENDEDTESTS + invoke_test<simd<T, simd_abi::scalar>>(int()); + invoke_test<simd<T, simd_abi::_VecBuiltin<16>>>(int()); + invoke_test<simd<T, simd_abi::_VecBltnBtmsk<64>>>(int()); +#elif EXTENDEDTESTS == 0 + invoke_test<simd<T, simd_abi::_VecBuiltin<8>>>(int()); + invoke_test<simd<T, simd_abi::_VecBuiltin<12>>>(int()); + invoke_test<simd<T, simd_abi::_VecBuiltin<24>>>(int()); + invoke_test<simd<T, simd_abi::_VecBuiltin<32>>>(int()); + invoke_test<simd<T, simd_abi::_VecBltnBtmsk<56>>>(int()); +#elif EXTENDEDTESTS == 1 + invoke_test<simd<T, simd_abi::fixed_size<8>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<16>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<24>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<32>>>(int()); +#elif EXTENDEDTESTS == 2 + invoke_test<simd<T, simd_abi::fixed_size<1>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<9>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<17>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<25>>>(int()); +#elif EXTENDEDTESTS == 3 + invoke_test<simd<T, simd_abi::fixed_size<2>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<10>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<18>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<26>>>(int()); +#elif EXTENDEDTESTS == 4 + invoke_test<simd<T, simd_abi::fixed_size<3>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<19>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<11>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<27>>>(int()); +#elif EXTENDEDTESTS == 5 + invoke_test<simd<T, simd_abi::fixed_size<4>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<12>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<20>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<28>>>(int()); +#elif EXTENDEDTESTS == 6 + invoke_test<simd<T, simd_abi::fixed_size<5>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<13>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<21>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<29>>>(int()); +#elif EXTENDEDTESTS == 7 + invoke_test<simd<T, simd_abi::fixed_size<6>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<14>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<22>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<30>>>(int()); +#elif EXTENDEDTESTS == 8 + invoke_test<simd<T, simd_abi::fixed_size<7>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<15>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<23>>>(int()); + invoke_test<simd<T, simd_abi::fixed_size<31>>>(int()); +#endif + } + +int main() +{ + iterate_abis<_GLIBCXX_SIMD_TESTTYPE>(); + return 0; +} + +#endif // TESTS_BITS_MAIN_H_ diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/make_vec.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/make_vec.h index 82e63d1..3744965 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/bits/make_vec.h +++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/make_vec.h @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. +#ifndef SIMD_TESTS_BITS_MAKE_VEC_H_ +#define SIMD_TESTS_BITS_MAKE_VEC_H_ #include <experimental/simd> template <class M> @@ -36,6 +38,13 @@ template <class M> } } +template <class M> + M + make_alternating_mask() + { + return make_mask<M>({false, true}); + } + template <class V> inline V make_vec(const std::initializer_list<typename V::value_type> &init, @@ -57,3 +66,4 @@ template <class V> base += inc; } } +#endif // SIMD_TESTS_BITS_MAKE_VEC_H_ diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/mathreference.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/mathreference.h index 1553aa7..87c4df7 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/bits/mathreference.h +++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/mathreference.h @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. +#ifndef SIMD_TESTS_BITS_MATHREFERENCE_H_ +#define SIMD_TESTS_BITS_MATHREFERENCE_H_ #include <tuple> #include <utility> #include <cstdio> @@ -158,3 +160,4 @@ template <class Fun, class T, class Ref = testdatatype_for_function_t<Fun, T>> } return data; } +#endif // SIMD_TESTS_BITS_MATHREFERENCE_H_ diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/test_values.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/test_values.h index ccbe19d..c3bd082 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/bits/test_values.h +++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/test_values.h @@ -15,6 +15,11 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. +#ifndef SIMD_TESTS_BITS_TEST_VALUES_H_ +#define SIMD_TESTS_BITS_TEST_VALUES_H_ + +#include "verify.h" + #include <experimental/simd> #include <initializer_list> #include <random> @@ -381,3 +386,4 @@ template <class V> #endif #define MAKE_TESTER(name_) MAKE_TESTER_2(name_, std::name_) +#endif // SIMD_TESTS_BITS_TEST_VALUES_H_ diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h b/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h index e60ff93..2ab3ad3 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h +++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h @@ -286,68 +286,4 @@ template <typename V, typename = decltype(V())> __builtin_fprintf(stderr, "PASS: %s\n", __PRETTY_FUNCTION__); } -template <class T> - void - iterate_abis() - { - using namespace std::experimental::parallelism_v2; -#ifndef EXTENDEDTESTS - invoke_test<simd<T, simd_abi::scalar>>(int()); - invoke_test<simd<T, simd_abi::_VecBuiltin<16>>>(int()); - invoke_test<simd<T, simd_abi::_VecBltnBtmsk<64>>>(int()); -#elif EXTENDEDTESTS == 0 - invoke_test<simd<T, simd_abi::_VecBuiltin<8>>>(int()); - invoke_test<simd<T, simd_abi::_VecBuiltin<12>>>(int()); - invoke_test<simd<T, simd_abi::_VecBuiltin<24>>>(int()); - invoke_test<simd<T, simd_abi::_VecBuiltin<32>>>(int()); - invoke_test<simd<T, simd_abi::_VecBltnBtmsk<56>>>(int()); -#elif EXTENDEDTESTS == 1 - invoke_test<simd<T, simd_abi::fixed_size<8>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<16>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<24>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<32>>>(int()); -#elif EXTENDEDTESTS == 2 - invoke_test<simd<T, simd_abi::fixed_size<1>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<9>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<17>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<25>>>(int()); -#elif EXTENDEDTESTS == 3 - invoke_test<simd<T, simd_abi::fixed_size<2>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<10>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<18>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<26>>>(int()); -#elif EXTENDEDTESTS == 4 - invoke_test<simd<T, simd_abi::fixed_size<3>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<19>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<11>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<27>>>(int()); -#elif EXTENDEDTESTS == 5 - invoke_test<simd<T, simd_abi::fixed_size<4>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<12>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<20>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<28>>>(int()); -#elif EXTENDEDTESTS == 6 - invoke_test<simd<T, simd_abi::fixed_size<5>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<13>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<21>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<29>>>(int()); -#elif EXTENDEDTESTS == 7 - invoke_test<simd<T, simd_abi::fixed_size<6>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<14>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<22>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<30>>>(int()); -#elif EXTENDEDTESTS == 8 - invoke_test<simd<T, simd_abi::fixed_size<7>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<15>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<23>>>(int()); - invoke_test<simd<T, simd_abi::fixed_size<31>>>(int()); -#endif - } - -int main() -{ - iterate_abis<_GLIBCXX_SIMD_TESTTYPE>(); - return 0; -} - #endif // TESTS_BITS_VERIFY_H_ diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/broadcast.cc b/libstdc++-v3/testsuite/experimental/simd/tests/broadcast.cc index 7e06c66..6265e31 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/broadcast.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/broadcast.cc @@ -16,8 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" enum unscoped_enum { foo }; diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/casts.cc b/libstdc++-v3/testsuite/experimental/simd/tests/casts.cc index 022a583..8e8d828 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/casts.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/casts.cc @@ -16,9 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/conversions.h" +#include "bits/main.h" using std::experimental::simd_cast; using std::experimental::static_simd_cast; diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/fpclassify.cc b/libstdc++-v3/testsuite/experimental/simd/tests/fpclassify.cc index 453f17f..00c608f 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/fpclassify.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/fpclassify.cc @@ -17,9 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" #include <cfenv> template <typename F> diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/frexp.cc b/libstdc++-v3/testsuite/experimental/simd/tests/frexp.cc index 5e04f4f..f6a47ce 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/frexp.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/frexp.cc @@ -17,9 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/generator.cc b/libstdc++-v3/testsuite/experimental/simd/tests/generator.cc index b582c04..001625c 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/generator.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/generator.cc @@ -16,8 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" template <class V> struct call_generator diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc b/libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc index b5e3749..6f0d75a 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc @@ -18,9 +18,7 @@ // only: float|double|ldouble * * * // skip: ldouble * powerpc64* * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" // 3-arg std::hypot needs to be fixed, this is a better reference: template <typename T> diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/integer_operators.cc b/libstdc++-v3/testsuite/experimental/simd/tests/integer_operators.cc index e3718ce..7a2bc08 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/integer_operators.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/integer_operators.cc @@ -16,9 +16,8 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/make_vec.h" -#include "bits/metahelpers.h" +// timeout-factor: 2 +#include "bits/main.h" template <typename T, T Begin, T End, T Stride = 1, typename F> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc b/libstdc++-v3/testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc index 1943c36..0fb1338 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc @@ -17,9 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc b/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc index f354eff..f793300 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc @@ -17,9 +17,7 @@ // expensive: * [1-9] * * // timeout-factor: 2 -#include "bits/verify.h" -#include "bits/make_vec.h" -#include "bits/conversions.h" +#include "bits/main.h" template <typename V, typename U> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/logarithm.cc b/libstdc++-v3/testsuite/experimental/simd/tests/logarithm.cc index d7f4297..31ad149 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/logarithm.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/logarithm.cc @@ -17,10 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/mathreference.h" -#include "bits/test_values.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_broadcast.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_broadcast.cc index 0ed56e2..2f60136 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_broadcast.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_broadcast.cc @@ -16,8 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_conversions.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_conversions.cc index 13afd69..8cdd7b7 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_conversions.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_conversions.cc @@ -16,7 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" +#include "bits/main.h" namespace stdx = std::experimental; diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_implicit_cvt.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_implicit_cvt.cc index 0003db3..a7b6c92 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_implicit_cvt.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_implicit_cvt.cc @@ -16,8 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" template <class M, class M2> constexpr bool assign_should_work diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_loadstore.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_loadstore.cc index b9f3cef..d8e58a0 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_loadstore.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_loadstore.cc @@ -16,34 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" - -// simd_mask generator functions -template <class M> - M - make_mask(const std::initializer_list<bool>& init) - { - std::size_t i = 0; - M r = {}; - for (;;) - { - for (bool x : init) - { - r[i] = x; - if (++i == M::size()) - { - return r; - } - } - } - } - -template <class M> - M - make_alternating_mask() - { - return make_mask<M>({false, true}); - } +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_operator_cvt.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_operator_cvt.cc index b91832a..1c7ccab 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_operator_cvt.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_operator_cvt.cc @@ -16,8 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" using schar = signed char; using uchar = unsigned char; diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_operators.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_operators.cc index b425202..70b82a5 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_operators.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_operators.cc @@ -16,8 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/mask_reductions.cc b/libstdc++-v3/testsuite/experimental/simd/tests/mask_reductions.cc index b863f2d..1e9ffb7 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/mask_reductions.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/mask_reductions.cc @@ -16,35 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" - -// simd_mask generator functions -template <class M> - M - make_mask(const std::initializer_list<bool>& init) - { - std::size_t i = 0; - M r = {}; - for (;;) - { - for (bool x : init) - { - r[i] = x; - if (++i == M::size()) - { - return r; - } - } - } - } - -template <class M> - M - make_alternating_mask() - { - return make_mask<M>({false, true}); - } +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/math_1arg.cc b/libstdc++-v3/testsuite/experimental/simd/tests/math_1arg.cc index db401c1..50a740d 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/math_1arg.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/math_1arg.cc @@ -17,8 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/test_values.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/math_2arg.cc b/libstdc++-v3/testsuite/experimental/simd/tests/math_2arg.cc index 08b36c6..1abf181 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/math_2arg.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/math_2arg.cc @@ -17,9 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc b/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc index 921917e..c1acfdf 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/operator_cvt.cc @@ -16,8 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" +#include "bits/main.h" // type with sizeof(char) but different signedness using xchar = std::conditional_t<std::is_unsigned_v<char>, schar, uchar>; diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc b/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc index 6d48220..c4d91fa 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc @@ -16,19 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/make_vec.h" -#include "bits/test_values.h" - -template <class T> - constexpr T - genHalfBits() - { - if constexpr (std::is_floating_point_v<T>) - return 0; - else - return std::__finite_max_v<T> >> (std::__digits_v<T> / 2); - } +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc b/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc index 62072e7..0c4c79f 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc @@ -16,9 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" #include <random> template <typename V> diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/remqo.cc b/libstdc++-v3/testsuite/experimental/simd/tests/remqo.cc index 8c76f66..bc9f94d 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/remqo.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/remqo.cc @@ -17,9 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/simd.cc b/libstdc++-v3/testsuite/experimental/simd/tests/simd.cc index 14fc71a..b729c97 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/simd.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/simd.cc @@ -16,7 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/sincos.cc b/libstdc++-v3/testsuite/experimental/simd/tests/sincos.cc index 16637f5..2e81a8e 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/sincos.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/sincos.cc @@ -18,11 +18,7 @@ // only: float|double|ldouble * * * // xfail: run * * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/mathreference.h" -#include "bits/simd_view.h" -#include "bits/test_values.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/split_concat.cc b/libstdc++-v3/testsuite/experimental/simd/tests/split_concat.cc index 85ca7ae..102229b 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/split_concat.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/split_concat.cc @@ -16,9 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/conversions.h" +#include "bits/main.h" using std::experimental::simd_cast; diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/splits.cc b/libstdc++-v3/testsuite/experimental/simd/tests/splits.cc index 94c82ec..f87bce8 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/splits.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/splits.cc @@ -16,7 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/trigonometric.cc b/libstdc++-v3/testsuite/experimental/simd/tests/trigonometric.cc index 8e16ce4..a678ff48 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/trigonometric.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/trigonometric.cc @@ -17,9 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/metahelpers.h" -#include "bits/test_values.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/trunc_ceil_floor.cc b/libstdc++-v3/testsuite/experimental/simd/tests/trunc_ceil_floor.cc index 51575df..ecbc148 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/trunc_ceil_floor.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/trunc_ceil_floor.cc @@ -17,8 +17,7 @@ // only: float|double|ldouble * * * // expensive: * [1-9] * * -#include "bits/test_values.h" -#include "bits/verify.h" +#include "bits/main.h" template <typename V> void diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/where.cc b/libstdc++-v3/testsuite/experimental/simd/tests/where.cc index 79cc949..b6f6d33 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/where.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/where.cc @@ -16,9 +16,7 @@ // <http://www.gnu.org/licenses/>. // expensive: * [1-9] * * -#include "bits/verify.h" -#include "bits/make_vec.h" -#include "bits/metahelpers.h" +#include "bits/main.h" template <class V> struct Convertible |