This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[PATCH][libstdc++-v3 parallel mode] parallel equal not equal
- From: Johannes Singler <singler at kit dot edu>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 09 Nov 2010 08:52:33 +0100
- Subject: [PATCH][libstdc++-v3 parallel mode] parallel equal not equal
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
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