From patchwork Mon Feb 20 16:31:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kretz X-Patchwork-Id: 1745156 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=eqVGUo9q; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PL7HY3B3Cz23yV for ; Tue, 21 Feb 2023 03:32:23 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CDABA3858028 for ; Mon, 20 Feb 2023 16:32:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CDABA3858028 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676910740; bh=iWI2mK9TlfFhthfgbJ9HXpEq3+b+qPFtqOiZzyM/dXE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=eqVGUo9q4SvXg8IbMt132YDd7MFmw9knXQB9m7c+W8uMSXIxw4+Hg5uBwrMIYLCHL TI9ChVFWvn8ZMi4H5RRexRybDo/Dk9/ZxIq0OxQ0/3Kp/0mTylHB11gIYVdfl1vu8R YVXjvPVH2AUoJ30eKyGxTfenuAouCIU7vVskPtR8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from lxmtout1.gsi.de (lxmtout1.gsi.de [140.181.3.111]) by sourceware.org (Postfix) with ESMTPS id DD6213858D1E; Mon, 20 Feb 2023 16:31:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DD6213858D1E Received: from localhost (localhost [127.0.0.1]) by lxmtout1.gsi.de (Postfix) with ESMTP id DBF282051042; Mon, 20 Feb 2023 17:31:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lxmtout1.gsi.de Received: from lxmtout1.gsi.de ([127.0.0.1]) by localhost (lxmtout1.gsi.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Av51ky4FQ3FP; Mon, 20 Feb 2023 17:31:56 +0100 (CET) Received: from srvEX6.campus.gsi.de (unknown [10.10.4.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lxmtout1.gsi.de (Postfix) with ESMTPS id BF9CB2051040; Mon, 20 Feb 2023 17:31:56 +0100 (CET) Received: from minbar.localnet (140.181.3.12) by srvEX6.campus.gsi.de (10.10.4.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Mon, 20 Feb 2023 17:31:56 +0100 To: , Subject: [committed] libstdc++: Fix uses of non-reserved names in simd header Date: Mon, 20 Feb 2023 17:31:55 +0100 Message-ID: <12342604.nUPlyArG6x@minbar> Organization: GSI Helmholtz Centre for Heavy Ion Research MIME-Version: 1.0 X-Originating-IP: [140.181.3.12] X-ClientProxiedBy: srvEX8.Campus.gsi.de (10.10.4.160) To srvEX6.campus.gsi.de (10.10.4.96) X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Matthias Kretz via Gcc-patches From: Matthias Kretz Reply-To: Matthias Kretz Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Tested x86_64-pc-linux. Pushed to trunk. -- >8 -- Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h (__extract_part, split): Use reserved name for template parameter. --- libstdc++-v3/include/experimental/bits/simd.h | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) -- ────────────────────────────────────────────────────────────────────────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de stdₓ::simd ────────────────────────────────────────────────────────────────────────── diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h index ffe72fa6ccf..2f615d13b73 100644 --- a/libstdc++-v3/include/experimental/bits/simd.h +++ b/libstdc++-v3/include/experimental/bits/simd.h @@ -3783,7 +3783,7 @@ template _SimdWrapper<_Tp, _Np / _Total * _Combine> __extract_part(const _SimdWrapper<_Tp, _Np> __x); -template _GLIBCXX_SIMD_INTRINSIC auto __extract_part(const _SimdTuple<_Tp, _A0, _As...>& __x); @@ -3896,19 +3896,19 @@ template // split(simd) {{{ template / _V::size()> - enable_if_t == Parts * _V::size() - && is_simd_v<_V>, array<_V, Parts>> + size_t _Parts = simd_size_v / _V::size()> + enable_if_t == _Parts * _V::size() + && is_simd_v<_V>, array<_V, _Parts>> split(const simd& __x) { using _Tp = typename _V::value_type; - if constexpr (Parts == 1) + if constexpr (_Parts == 1) { return {simd_cast<_V>(__x)}; } else if (__x._M_is_constprop()) { - return __generate_from_n_evaluations>( + return __generate_from_n_evaluations<_Parts, array<_V, _Parts>>( [&](auto __i) constexpr _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { return _V([&](auto __j) constexpr _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { return __x[__i * _V::size() + __j]; }); @@ -3925,12 +3925,12 @@ template * const __element_ptr = reinterpret_cast*>(&__data(__x)); - return __generate_from_n_evaluations>( + return __generate_from_n_evaluations<_Parts, array<_V, _Parts>>( [&](auto __i) constexpr _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { return _V(__element_ptr + __i * _V::size(), vector_aligned); }); #else const auto& __xx = __data(__x); - return __generate_from_n_evaluations>( + return __generate_from_n_evaluations<_Parts, array<_V, _Parts>>( [&](auto __i) constexpr _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { [[maybe_unused]] constexpr size_t __offset = decltype(__i)::value * _V::size(); @@ -3944,12 +3944,12 @@ template ) { // normally memcpy should work here as well - return __generate_from_n_evaluations>( + return __generate_from_n_evaluations<_Parts, array<_V, _Parts>>( [&](auto __i) constexpr _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { return __x[__i]; }); } else { - return __generate_from_n_evaluations>( + return __generate_from_n_evaluations<_Parts, array<_V, _Parts>>( [&](auto __i) constexpr _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { if constexpr (__is_fixed_size_abi_v) return _V([&](auto __j) constexpr _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { @@ -3957,7 +3957,7 @@ template (__data(__x))); + __extract_part(__data(__x))); }); } }