From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7857) id 825703858C5E; Thu, 23 Feb 2023 10:43:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 825703858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677149016; bh=nnqPoBNAKcjjgTEr0nVMUL6+ZosojyfApVO1e6MBx2E=; h=From:To:Subject:Date:From; b=SYXdxXuiWydnIKOrxyKnxLb4lmiyX9YX5pxl+855Z1JkBBpNcEhFWrqEp1DcUDSg+ WWVkyddjyW9oODb3ZEo8dqDq8oN3PwJGwVezpltgdEiWlS012b1u7aQ6ueNsjjUDdB 6hhF1ycRfBayNFqrVGl9pxZS9vQInXwolA3Au/84= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Matthias Kretz To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-10540] libstdc++: Fix uses of non-reserved names in simd header X-Act-Checkin: gcc X-Git-Author: Matthias Kretz X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: 6a831dff3917a9b4570ebcd80aac22e60da10b57 X-Git-Newrev: 5ecf4567452cf10d3f9970d414f1c21622c122f8 Message-Id: <20230223104336.825703858C5E@sourceware.org> Date: Thu, 23 Feb 2023 10:43:36 +0000 (GMT) List-Id: https://gcc.gnu.org/g:5ecf4567452cf10d3f9970d414f1c21622c122f8 commit r11-10540-g5ecf4567452cf10d3f9970d414f1c21622c122f8 Author: Matthias Kretz Date: Thu Feb 16 16:29:54 2023 +0100 libstdc++: Fix uses of non-reserved names in simd header Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h (__extract_part, split): Use reserved name for template parameter. (cherry picked from commit bb920f561e983c64d146f173dc4ebc098441a962) Diff: --- libstdc++-v3/include/experimental/bits/simd.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h index e9a07018cf0..cd811df7bfc 100644 --- a/libstdc++-v3/include/experimental/bits/simd.h +++ b/libstdc++-v3/include/experimental/bits/simd.h @@ -3595,7 +3595,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); @@ -3708,19 +3708,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 { return _V([&](auto __j) constexpr { return __x[__i * _V::size() + __j]; @@ -3738,13 +3738,13 @@ 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 { 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 { [[maybe_unused]] constexpr size_t __offset = decltype(__i)::value * _V::size(); @@ -3758,12 +3758,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 { return __x[__i]; }); } else { - return __generate_from_n_evaluations>([&]( + return __generate_from_n_evaluations<_Parts, array<_V, _Parts>>([&]( auto __i) constexpr { if constexpr (__is_fixed_size_abi_v) return _V([&](auto __j) constexpr { @@ -3771,7 +3771,7 @@ template (__data(__x))); + __extract_part(__data(__x))); }); } }