From patchwork Tue Nov 9 07:52:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Johannes Singler X-Patchwork-Id: 70499 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 8B086B7121 for ; Tue, 9 Nov 2010 18:53:22 +1100 (EST) Received: (qmail 18696 invoked by alias); 9 Nov 2010 07:52:52 -0000 Received: (qmail 18570 invoked by uid 22791); 9 Nov 2010 07:52:49 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from iramx2.ira.uni-karlsruhe.de (HELO iramx2.ira.uni-karlsruhe.de) (141.3.10.81) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Nov 2010 07:52:44 +0000 Received: from irams1.ira.uni-karlsruhe.de ([141.3.10.5]) by iramx2.ira.uni-karlsruhe.de with esmtps port 25 id 1PFj0M-0008GM-8x; Tue, 09 Nov 2010 08:52:41 +0100 Received: from i10pc67.iti.kit.edu ([141.3.24.67]) by irams1.ira.uni-karlsruhe.de with esmtps port 465 id 1PFj0L-0007DN-UI; Tue, 09 Nov 2010 08:52:33 +0100 Message-ID: <4CD8FDC1.3060304@kit.edu> Date: Tue, 09 Nov 2010 08:52:33 +0100 From: Johannes Singler User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100914 SUSE/3.1.4 Thunderbird/3.1.4 MIME-Version: 1.0 To: libstdc++ , gcc-patches@gcc.gnu.org Subject: [PATCH][libstdc++-v3 parallel mode] parallel equal not equal X-ATIS-AV: ClamAV (irams1.ira.uni-karlsruhe.de) X-ATIS-AV: ClamAV (iramx2.ira.uni-karlsruhe.de) X-ATIS-AV: Kaspersky (iramx2.ira.uni-karlsruhe.de) X-ATIS-Timestamp: iramx2.ira.uni-karlsruhe.de 1289289161.741201000 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Patch following up the discussion. Thanks to François for bringing this bug to our attention. Tested x86_64-unknown-linux-gnu: No regressions Please approve for mainline. 2010-11-09 Johannes Singler * include/parallel/algobase.h (equal): Call parallel variant for applicable overloads. Johannes Index: include/parallel/algobase.h =================================================================== --- include/parallel/algobase.h (revision 166350) +++ include/parallel/algobase.h (working copy) @@ -142,8 +142,7 @@ inline bool equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2) { - return _GLIBCXX_STD_P::mismatch(__begin1, __end1, __begin2).first - == __end1; + return mismatch(__begin1, __end1, __begin2).first == __end1; } // Public interface @@ -152,8 +151,7 @@ equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _Predicate __pred) { - return _GLIBCXX_STD_P::mismatch(__begin1, __end1, __begin2, __pred).first - == __end1; + return mismatch(__begin1, __end1, __begin2, __pred).first == __end1; } // Sequential fallback