Patchwork [libstdc++-v3,parallel,mode] parallel equal not equal

login
register
mail settings
Submitter Johannes Singler
Date Nov. 9, 2010, 7:52 a.m.
Message ID <4CD8FDC1.3060304@kit.edu>
Download mbox | patch
Permalink /patch/70499/
State New
Headers show

Comments

Johannes Singler - Nov. 9, 2010, 7:52 a.m.
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  <singler@kit.edu>

         * include/parallel/algobase.h (equal):  Call parallel variant
	for applicable overloads.

Johannes
Paolo Carlini - Nov. 9, 2010, 9:35 a.m.
On 11/09/2010 08:52 AM, Johannes Singler wrote:
> 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.
The patch is Ok, please add Francois to the ChangeLog entry.

Thanks!
Paolo.

Patch

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