public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Matthias Kretz <mkretz@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-6092] libstdc++: Use a PCH to speed up check-simd Date: Thu, 16 Feb 2023 14:59:01 +0000 (GMT) [thread overview] Message-ID: <20230216145901.B1816385B526@sourceware.org> (raw) https://gcc.gnu.org/g:073df3e73f3080aee836c538b058180405f9dcd2 commit r13-6092-g073df3e73f3080aee836c538b058180405f9dcd2 Author: Matthias Kretz <m.kretz@gsi.de> Date: Thu Feb 2 12:26:35 2023 +0100 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. Diff: --- .../experimental/simd/generate_makefile.sh | 24 +++++- .../testsuite/experimental/simd/tests/abs.cc | 4 +- .../experimental/simd/tests/algorithms.cc | 3 +- .../experimental/simd/tests/bits/conversions.h | 25 +++---- .../testsuite/experimental/simd/tests/bits/main.h | 87 ++++++++++++++++++++++ .../experimental/simd/tests/bits/make_vec.h | 10 +++ .../experimental/simd/tests/bits/mathreference.h | 3 + .../experimental/simd/tests/bits/test_values.h | 6 ++ .../experimental/simd/tests/bits/verify.h | 64 ---------------- .../testsuite/experimental/simd/tests/broadcast.cc | 3 +- .../testsuite/experimental/simd/tests/casts.cc | 4 +- .../experimental/simd/tests/fpclassify.cc | 4 +- .../testsuite/experimental/simd/tests/frexp.cc | 4 +- .../testsuite/experimental/simd/tests/generator.cc | 3 +- .../experimental/simd/tests/hypot3_fma.cc | 4 +- .../experimental/simd/tests/integer_operators.cc | 5 +- .../simd/tests/ldexp_scalbn_scalbln_modf.cc | 4 +- .../testsuite/experimental/simd/tests/loadstore.cc | 4 +- .../testsuite/experimental/simd/tests/logarithm.cc | 5 +- .../experimental/simd/tests/mask_broadcast.cc | 3 +- .../experimental/simd/tests/mask_conversions.cc | 2 +- .../experimental/simd/tests/mask_implicit_cvt.cc | 3 +- .../experimental/simd/tests/mask_loadstore.cc | 29 +------- .../experimental/simd/tests/mask_operator_cvt.cc | 3 +- .../experimental/simd/tests/mask_operators.cc | 3 +- .../experimental/simd/tests/mask_reductions.cc | 30 +------- .../testsuite/experimental/simd/tests/math_1arg.cc | 3 +- .../testsuite/experimental/simd/tests/math_2arg.cc | 4 +- .../experimental/simd/tests/operator_cvt.cc | 3 +- .../testsuite/experimental/simd/tests/operators.cc | 14 +--- .../experimental/simd/tests/reductions.cc | 4 +- .../testsuite/experimental/simd/tests/remqo.cc | 4 +- .../testsuite/experimental/simd/tests/simd.cc | 2 +- .../testsuite/experimental/simd/tests/sincos.cc | 6 +- .../experimental/simd/tests/split_concat.cc | 4 +- .../testsuite/experimental/simd/tests/splits.cc | 2 +- .../experimental/simd/tests/trigonometric.cc | 4 +- .../experimental/simd/tests/trunc_ceil_floor.cc | 3 +- .../testsuite/experimental/simd/tests/where.cc | 4 +- 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 ce5162a6ceb..9fb33e4cbd2 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 2a0716e1643..53cc66855dd 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 dac0981622e..6242eb89337 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 2b12de6b4b2..7bd70cea53b 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 00000000000..270b433aa17 --- /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 82e63d18ad1..3744965f439 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 1553aa7bb51..87c4df7b176 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 ccbe19de4b0..c3bd082f709 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 e60ff93d2e6..2ab3ad3fa8c 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 7e06c6632d8..6265e31b079 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 022a583c331..8e8d828c756 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 453f17f256e..00c608f9530 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 5e04f4f2927..f6a47cedd13 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 b582c04067b..001625cfd26 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 b5e3749ebc4..6f0d75ac007 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 e3718ce40a3..7a2bc085e49 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 1943c360077..0fb1338fc04 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 f354eff9139..f7933007cc7 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 d7f4297c094..31ad1499e00 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 0ed56e2d2ee..2f601368775 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 13afd69348e..8cdd7b74b44 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 0003db3114d..a7b6c92e2a0 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 b9f3cef021d..d8e58a0032b 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 b91832a431c..1c7ccab5836 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 b42520202a0..70b82a514bb 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 b863f2d5c0c..1e9ffb7aca5 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 db401c124f2..50a740dec81 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 08b36c60331..1abf18128fb 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 921917e4d88..c1acfdf10e0 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 6d482201fab..c4d91fa5d2b 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 62072e72155..0c4c79feb20 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 8c76f66b842..bc9f94d8265 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 14fc71ac1a4..b729c97bec9 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 16637f50cfc..2e81a8e5585 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 85ca7ae8199..102229b70f1 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 94c82ecc3c3..f87bce8a7dc 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 8e16ce4a1cf..a678ff48fee 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 51575df48cb..ecbc1481600 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 79cc949c64e..b6f6d333191 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
reply other threads:[~2023-02-16 14:59 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230216145901.B1816385B526@sourceware.org \ --to=mkretz@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).