This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][libstdc++-v3 parallel mode] Enable user-defined swap


On 01/24/2011 06:07 PM, Johannes Singler wrote:
The following patch enables user-defined swap for parallel sorting
and the like, which can improve performance.

There was still one "using std::swap" missing.


Tested x86_64-unknown-linux-gnu: No regressions

Committed to mainline as obvious.

2011-02-11 Johannes Singler <singler@kit.edu>

        PR libstdc++/47433
        * include/parallel/losertree.h
        (_LoserTreeUnguarded<>::__delete_min_insert):
        Add missing "using std::swap;", as for other variants.

Johannes
Index: include/parallel/losertree.h
===================================================================
--- include/parallel/losertree.h	(revision 170044)
+++ include/parallel/losertree.h	(working copy)
@@ -775,6 +775,7 @@
       void
       __delete_min_insert(_Tp __key, bool)
       {
+        using std::swap;
 #if _GLIBCXX_ASSERTIONS
 	// no dummy sequence can ever be at the top!
 	_GLIBCXX_PARALLEL_ASSERT(_M_losers[0]._M_source != -1);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]