This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH][libstdc++-v3 parallel mode] Enable user-defined swap
- 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: Fri, 11 Feb 2011 11:11:49 +0100
- Subject: Re: [PATCH][libstdc++-v3 parallel mode] Enable user-defined swap
- References: <4D3DB1E0.5010008@kit.edu>
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);