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

Johannes Singler singler@kit.edu
Fri Feb 25 14:09:00 GMT 2011


On 01/24/2011 07:12 PM, Benjamin Kosnik wrote:
>
>> Also commit to gcc-4_5-branch?
>
> Ok.
>
> -benjamin

The following patch enables user-defined swap for parallel sorting and 
the like, which can improve performance.

Tested x86_64-unknown-linux-gnu: No regressions

Committed.

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

         PR libstdc++/47433
         * include/parallel/losertree.h
         (_LoserTree<>::__delete_min_insert):
         Do not qualify swap with std:: for value type,
         but include a using directive instead.
         (_LoserTreeUnguarded<>::__delete_min_insert): Likewise.
         * include/parallel/balanced_quicksort.h (__qsb_divide):
         Use std::iter_swap instead of std::swap.
         (__qsb_local_sort_with_helping): Likewise.
         * include/parallel/partition.h (__parallel_partition):
         Likewise. (__parallel_nth_element): Likewise.

Johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swap_not_explicitly_correct.patch
Type: text/x-patch
Size: 4972 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20110225/ff36b30b/attachment.bin>


More information about the Libstdc++ mailing list