[Bug libstdc++/47433] New: libstdc++ parallel mode calls std::swap explicitely
manuel.holtgrewe@fu-berlin.de
gcc-bugzilla@gcc.gnu.org
Mon Jan 24 12:52:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47433
Summary: libstdc++ parallel mode calls std::swap explicitely
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: libstdc++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: manuel.holtgrewe@fu-berlin.de
The parallel libstdc++ calls std::swap explicitely. To my knowledge, this
disables the user to specify his own, possibly more efficient swap routine.
This is especially severe in parallel sorting and partitioning.
libstdc++-v3-parallel-trunk $ ack 'std::swap'
balanced_quicksort.h
135: std::swap(*__pivot_pos, *(__end - 1));
147: std::swap(*(__begin + __split_pos), *__pivot_pos);
287: std::swap(*__pivot_pos, *(__end - 1));
306: std::swap(*__split_pos1, *__pivot_pos);
losertree.h
237: std::swap(_M_losers[__pos]._M_sup, __sup);
238: std::swap(_M_losers[__pos]._M_source, __source);
239: std::swap(_M_losers[__pos]._M_key, __key);
333: std::swap(_M_losers[__pos]._M_sup, __sup);
334: std::swap(_M_losers[__pos]._M_source, __source);
335: std::swap(_M_losers[__pos]._M_key, __key);
464: std::swap(_M_losers[__pos]._M_sup, __sup);
465: std::swap(_M_losers[__pos]._M_source, __source);
466: std::swap(_M_losers[__pos]._M_keyp, __keyp);
541: std::swap(_M_losers[__pos]._M_sup, __sup);
542: std::swap(_M_losers[__pos]._M_source, __source);
543: std::swap(_M_losers[__pos]._M_keyp, __keyp);
697: std::swap(_M_losers[__pos]._M_source, __source);
698: std::swap(_M_losers[__pos]._M_key, __key);
788: std::swap(_M_losers[__pos]._M_source, __source);
789: std::swap(_M_losers[__pos]._M_key, __key);
937: std::swap(_M_losers[__pos]._M_source, __source);
938: std::swap(_M_losers[__pos]._M_keyp, __keyp);
1027: std::swap(_M_losers[__pos]._M_source, __source);
1028: std::swap(_M_losers[__pos]._M_keyp, __keyp);
partition.h
181: std::swap(__begin[__thread_left],
241: std::swap_ranges(__begin + __thread_left_border
264: std::swap_ranges(__begin + __thread_right_border,
304: std::swap(__begin[__final_left], __begin[__final_right]);
357: std::swap(*__pivot_pos, *(__end - 1));
379: std::swap(*__split_pos1, *__pivot_pos);
More information about the Gcc-bugs
mailing list