From: Jonathan Wakely <jwakely@redhat.com>
To: Matthias Kretz <m.kretz@gsi.de>
Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org
Subject: Re: [PATCH 1/2] Add std::experimental::simd from the Parallelism TS 2
Date: Wed, 27 Jan 2021 16:41:31 +0000 [thread overview]
Message-ID: <20210127164131.GA541588@redhat.com> (raw)
In-Reply-To: <3133130.QemTDgPxUG@excalibur>
On 18/12/20 16:49 +0100, Matthias Kretz wrote:
>Resending this patch with proper commit message and rebased on master.
>
>From: Matthias Kretz <kretz@kde.org>
>
>Adds <experimental/simd>.
>
>This implements the simd and simd_mask class templates via
>[[gnu::vector_size(N)]] data members. It implements overloads for all of
><cmath> for simd. Explicit vectorization of the <cmath> functions is not
>finished.
>The majority of functions are marked as [[gnu::always_inline]] to enable
>quasi-ODR-conforming linking of TUs with different -m flags.
>Performance optimization was done for x86_64. ARM, Aarch64, and POWER
>rely on the compiler to recognize reduction, conversion, and shuffle
>patterns.
>Besides verification using many different machine flages, the code was
>also verified with different fast-math flags.
>
>libstdc++-v3/ChangeLog:
> * doc/xml/manual/status_cxx2017.xml: Add implementation status
> of the Parallelism TS 2. Document implementation-defined types
> and behavior.
> * include/Makefile.am: Add new headers.
> * include/Makefile.in: Regenerate.
> * include/experimental/simd: New file. New header for
> Parallelism TS 2.
> * include/experimental/bits/numeric_traits.h: New file.
> Implementation of P1841R1 using internal naming. Addition of
> missing IEC559 functionality query.
> * include/experimental/bits/simd.h: New file. Definition of the
> public simd interfaces and general implementation helpers.
> * include/experimental/bits/simd_builtin.h: New file.
> Implementation of the _VecBuiltin simd_abi.
> * include/experimental/bits/simd_converter.h: New file. Generic
> simd conversions.
> * include/experimental/bits/simd_detail.h: New file. Internal
> macros for the simd implementation.
> * include/experimental/bits/simd_fixed_size.h: New file. Simd
> fixed_size ABI specific implementations.
> * include/experimental/bits/simd_math.h: New file. Math
> overloads for simd.
> * include/experimental/bits/simd_neon.h: New file. Simd NEON
> specific implementations.
> * include/experimental/bits/simd_ppc.h: New file. Implement bit
> shifts to avoid invalid results for integral types smaller than
> int.
> * include/experimental/bits/simd_scalar.h: New file. Simd scalar
> ABI specific implementations.
> * include/experimental/bits/simd_x86.h: New file. Simd x86
> specific implementations.
> * include/experimental/bits/simd_x86_conversions.h: New file.
> x86 specific conversion optimizations. The conversion patterns
> work around missing conversion patterns in the compiler and
> should be removed as soon as PR85048 is resolved.
> * testsuite/experimental/simd/standard_abi_usable.cc: New file.
> Test that all (not all fixed_size<N>, though) standard simd and
> simd_mask types are usable.
> * testsuite/experimental/simd/standard_abi_usable_2.cc: New
> file. As above but with -ffast-math.
> * testsuite/libstdc++-dg/conformance.exp: Don't build simd tests
> from the standard test loop. Instead use
> check_vect_support_and_set_flags to build simd tests with the
> relevant machine flags.
>---
> .../doc/xml/manual/status_cxx2017.xml | 216 +
> libstdc++-v3/include/Makefile.am | 13 +
> libstdc++-v3/include/Makefile.in | 13 +
> .../experimental/bits/numeric_traits.h | 567 ++
> libstdc++-v3/include/experimental/bits/simd.h | 5051 ++++++++++++++++
> .../include/experimental/bits/simd_builtin.h | 2949 ++++++++++
> .../experimental/bits/simd_converter.h | 354 ++
> .../include/experimental/bits/simd_detail.h | 306 +
> .../experimental/bits/simd_fixed_size.h | 2066 +++++++
> .../include/experimental/bits/simd_math.h | 1500 +++++
> .../include/experimental/bits/simd_neon.h | 519 ++
> .../include/experimental/bits/simd_ppc.h | 123 +
> .../include/experimental/bits/simd_scalar.h | 772 +++
> .../include/experimental/bits/simd_x86.h | 5169 +++++++++++++++++
> .../experimental/bits/simd_x86_conversions.h | 2029 +++++++
> libstdc++-v3/include/experimental/simd | 70 +
> .../experimental/simd/standard_abi_usable.cc | 64 +
> .../simd/standard_abi_usable_2.cc | 4 +
> .../testsuite/libstdc++-dg/conformance.exp | 18 +-
> 19 files changed, 21802 insertions(+), 1 deletion(-)
> create mode 100644 libstdc++-v3/include/experimental/bits/numeric_traits.h
> create mode 100644 libstdc++-v3/include/experimental/bits/simd.h
> create mode 100644 libstdc++-v3/include/experimental/bits/simd_builtin.h
> create mode 100644 libstdc++-v3/include/experimental/bits/simd_converter.h
> create mode 100644 libstdc++-v3/include/experimental/bits/simd_detail.h
> create mode 100644 libstdc++-v3/include/experimental/bits/simd_fixed_size.h
> create mode 100644 libstdc++-v3/include/experimental/bits/simd_math.h
> create mode 100644 libstdc++-v3/include/experimental/bits/simd_neon.h
> create mode 100644 libstdc++-v3/include/experimental/bits/simd_ppc.h
> create mode 100644 libstdc++-v3/include/experimental/bits/simd_scalar.h
> create mode 100644 libstdc++-v3/include/experimental/bits/simd_x86.h
> create mode 100644 libstdc++-v3/include/experimental/bits/
>simd_x86_conversions.h
> create mode 100644 libstdc++-v3/include/experimental/simd
> create mode 100644 libstdc++-v3/testsuite/experimental/simd/
>standard_abi_usable.cc
> create mode 100644 libstdc++-v3/testsuite/experimental/simd/
>standard_abi_usable_2.cc
I have pushed this to master, after a week of testing on x86_64 and
powerpc64 and powerpc64le.
I know it's stage 4 now, but this only adds a new experimental
implementation of a TS, it doesn't touch any existing code. The new
tests (which were in a separate patch) are all skipped by default, so
shouldn't cause any new failures for testers.
prev parent reply other threads:[~2021-01-27 16:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-18 15:49 Matthias Kretz
2021-01-27 16:41 ` Jonathan Wakely [this message]
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=20210127164131.GA541588@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=m.kretz@gsi.de \
/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: link
Be 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).