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: 59555 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1401370wrn; Mon, 20 Feb 2023 08:33:07 -0800 (PST) X-Google-Smtp-Source: AK7set860SSZ7SHwSXaeCHpoEACBchEfhewyqNVSvPkEiWJhfWr8EZI4mwW/0lK1IB9yh7xOolnJ X-Received: by 2002:a17:906:883:b0:87d:f29:3a16 with SMTP id n3-20020a170906088300b0087d0f293a16mr10270922eje.34.1676910787630; Mon, 20 Feb 2023 08:33:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676910787; cv=none; d=google.com; s=arc-20160816; b=LFEKzbxEbHn2m7Z3Oy2plznq4kh9iOX1c3XE4o1l1diiuZe4LknviY61txI+NJk4ju K+Y/95oGjFLJjt6zXvdxkXY91kZlAlL5kIbm63odPipCF7DnY44wgHhC8Q2SL0J2vVmi fltDI1uxWlGoRGQrO4H2j5hkb4czM25Xq7uWo3IApNtWZ7mVSyyNIGPbWsaotBMgyknZ u6NVbKAQhHuBL5Lt9htXi5VoVEOlyKnZs2jj7mzjImvTNB3tyCK3aMvyJAI+sehzm4Gl +JEYdrVz3vvAtWI/7kXaaOYactbhacyAqZbDPGoQWekoJo3mLM/dn4lhbb4B6rF8Ul/l iOUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:organization:message-id:date :subject:to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=iWI2mK9TlfFhthfgbJ9HXpEq3+b+qPFtqOiZzyM/dXE=; b=03khsEc1IWJHKA0gTbEixqXCCqd0khpBYvnWrcftV7LYiIPjm9iMGCCcKYI33duv9z GPE4+o+NANDBD6SxpGbEbg5580HtBs8lYonXOeVIPQJKcs90DV4X1VW6osD782J8LZtR aQB8aCRH0/QEY9wPIpArm3fuzaTrkpZGRyva79vCsGFqmzwJv87giNqaiOfQOQYOhcv1 ilZmW9PmkVt8oEJjcHU3BMu8o/dyYGkTaNVcHq9I/IHEX/FKIjEM4YDrf0lKSgCZ6E7P 4/21midyaDpOLIvyORW8qLsAANb5MMzRySPbm3bVAHe9EgV2B1j0llMfSIKohuZQ9n8n 4tEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=G27F2WX7; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id we6-20020a170907234600b008cfc3be35f6si4036512ejb.646.2023.02.20.08.33.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 08:33:07 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=G27F2WX7; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CFA08385B511 for ; Mon, 20 Feb 2023 16:32:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CFA08385B511 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676910768; 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=G27F2WX7wf8dx2nUfZ/aDC63X6RtXIBEr+9wgjnBCzAxyPR0V9NnyU7egezv50nzi 8GhpwqqZPTY8jGonNOOfy0WHKs21FKaFJTeHW9WVzWqcB1l++kkLJLJTsXsbMs0vVP SoR8HUvR6wNpwfKKQTTE604p+fYFl4FhoiqOBVC0= 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758368406448273070?= X-GMAIL-MSGID: =?utf-8?q?1758368406448273070?= 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))); }); } }