From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 882EB3858C78 for ; Wed, 17 May 2023 19:32:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 882EB3858C78 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684351921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kT3M3VpPeE1MtEEp8m+VA+9GJ0tzlATUHSuMjgESQ34=; b=eMo838+TR82AYDuRfjLsziUdhW5pdPE1CdSryfmrQtzJEGZ67BpEk9Wqo/Jercd+V+fluZ r3HNSkx7tnj1JcVhbswVHeKFMFg2DY7Ug7l6Tt2TdttCPTQyzWpPcsSiA+O+UIF5S/lAAV Lv3hPJoEkIxi1jdwlRX6ymN3F4af+h8= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-231-duwx4YXnNnyjT1paRTGgww-1; Wed, 17 May 2023 15:31:59 -0400 X-MC-Unique: duwx4YXnNnyjT1paRTGgww-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2af12cd4652so2784311fa.1 for ; Wed, 17 May 2023 12:31:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684351918; x=1686943918; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s4NhnJFNnJ+ZKySwNgN6pOohCtHlmR6jttMwg4HzEjY=; b=akR0gnWt1qK3BoxvGpIwLEk5FgLOreAaFQq3jbi83qRzcCXsjJ9vysA0T6oJPxe2/g AcDh2SUj+TVETszrwNrO+uMGSTzpTJsiTflYb7JcyJB7nK2sybkCfCkkWWxCAgBH3RD/ asByc6PWlhQnvZdV/K8k/bkelEP8scY0xERrvKf6soHQJFS5Pb/Mabrj0bCsrVoDEzHo vaiEbvhRzSzZZ+nF8R7ctVl/VFD4qLrbYU7KLqXAwZgS5y72UGI+DyygthfYerHZoskm 1T6x+izhDshqyoOPHcCKZaGEWmKfGDl1sOiPLWGcCMpqB+uGKWAh44mam8JrScg11iA4 rxEw== X-Gm-Message-State: AC+VfDyaCzFgIw9s0iBXYVs1Zo3dgEsplfU8rszjkiHnfC4nyvjWZA0g /K0W/rToqS3qB4/isLNYyOmneTIRG+dmUQsr30p3DNu+mwAKUdZPX79rdwcq3kb9D1u1/dtfiI+ R96APKQ5NNRP68zPT8dgKIOnSixuE47h+iw== X-Received: by 2002:a2e:7203:0:b0:2ab:19a0:667b with SMTP id n3-20020a2e7203000000b002ab19a0667bmr9372409ljc.0.1684351917957; Wed, 17 May 2023 12:31:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4HkloU142UEIGb0JOrIK31npw9DI6XC09bhZXTwooNgjOKYznCoCRNy9z2gr6ldFxxyB1rejSG2b6Rb0RGu0E= X-Received: by 2002:a2e:7203:0:b0:2ab:19a0:667b with SMTP id n3-20020a2e7203000000b002ab19a0667bmr9372406ljc.0.1684351917632; Wed, 17 May 2023 12:31:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Wed, 17 May 2023 20:31:46 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: Synchronize PSTL with upstream To: Thomas Rodgers Cc: "libstdc++" , gcc Patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000ba4a9005fbe8bdd7" X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000ba4a9005fbe8bdd7 Content-Type: text/plain; charset="UTF-8" -template - _OutputIterator -__brick_generate_n(_OutputIterator __first, _Size __count, _Generator __g, /* is_vector = */ std::true_type) noexcept +template Missing uglification on Size. +_RandomAccessIterator +__brick_generate_n(_RandomAccessIterator __first, Size __count, _Generator __g, + /* is_vector = */ std::true_type) noexcept { return __unseq_backend::__simd_generate_n(__first, __count, __g); } -template - _OutputIterator -__brick_generate_n(_OutputIterator __first, _Size __count, _Generator __g, /* is_vector = */ std::false_type) noexcept +template Missing uglification on OutputIterator and Size. +OutputIterator +__brick_generate_n(OutputIterator __first, Size __count, _Generator __g, /* is_vector = */ std::false_type) noexcept -template -_ForwardIterator2 -__brick_adjacent_difference(_ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __d_first, - _BinaryOperation __op, /*is_vector=*/std::true_type) noexcept +template Missing uglification on BinaryOperation. +_RandomAccessIterator2 +__brick_adjacent_difference(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, + _RandomAccessIterator2 __d_first, BinaryOperation __op, + /*is_vector=*/std::true_type) noexcept The above problems exist on the declaration and the definitions. --- a/libstdc++-v3/include/pstl/glue_execution_defs.h +++ b/libstdc++-v3/include/pstl/glue_execution_defs.h @@ -18,8 +18,8 @@ namespace std { // Type trait using __pstl::execution::is_execution_policy; -#if _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT -# if __INTEL_COMPILER +#if defined(_PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT) +# if defined(__INTEL_COMPILER) template constexpr bool is_execution_policy_v = is_execution_policy::value; # else Pre-existing, but that T should be _Tp, but it only affects the Intel compiler branch, so meh. Please fix these and report them upstream too. All the actual code changes look good. I think I'd prefer if __pattern_partial_sort_copy used std::uninitialized_copy instead of a loop and placement-new, but that doesn't need to hold this up. We could optimize some uses of std::conjunction and std::conditional to use our own __and_ and __conditional, but I'm not sure it's worth diverging from upstream to do that. Please fix the naming bugs noted above and push to trunk, thanks! +Reviewed-by: Jonathan Wakely --000000000000ba4a9005fbe8bdd7--