32 #ifndef _GLIBCXX_PARALLEL_SORT_H
33 #define _GLIBCXX_PARALLEL_SORT_H 1
39 #if _GLIBCXX_ASSERTIONS
43 #if _GLIBCXX_MERGESORT
47 #if _GLIBCXX_QUICKSORT
51 #if _GLIBCXX_BAL_QUICKSORT
55 namespace __gnu_parallel
58 template<
bool __stable,
typename _RAIter,
61 __parallel_sort(_RAIter __begin, _RAIter __end,
72 template<
bool __stable,
typename _RAIter,
typename _Compare>
74 __parallel_sort(_RAIter __begin, _RAIter __end,
80 parallel_sort_mwms<__stable, true>
83 parallel_sort_mwms<__stable, false>
95 template<
bool __stable,
typename _RAIter,
typename _Compare>
97 __parallel_sort(_RAIter __begin, _RAIter __end,
103 parallel_sort_mwms<__stable, true>
115 template<
bool __stable,
typename _RAIter,
typename _Compare>
117 __parallel_sort(_RAIter __begin, _RAIter __end,
123 parallel_sort_mwms<__stable, false>
134 template<
bool __stable,
typename _RAIter,
typename _Compare>
136 __parallel_sort(_RAIter __begin, _RAIter __end,
141 _GLIBCXX_PARALLEL_ASSERT(__stable ==
false);
155 template<
bool __stable,
typename _RAIter,
typename _Compare>
157 __parallel_sort(_RAIter __begin, _RAIter __end,
162 _GLIBCXX_PARALLEL_ASSERT(__stable ==
false);
176 template<
bool __stable,
typename _RAIter,
typename _Compare>
178 __parallel_sort(_RAIter __begin, _RAIter __end,
183 __parallel_sort<__stable>
184 (__begin, __end, __comp,
196 template<
bool __stable,
typename _RAIter,
typename _Compare>
198 __parallel_sort(_RAIter __begin, _RAIter __end,
202 typedef std::iterator_traits<_RAIter> _TraitsType;
203 typedef typename _TraitsType::value_type _ValueType;
204 typedef typename _TraitsType::difference_type _DifferenceType;
207 #if _GLIBCXX_MERGESORT
211 parallel_sort_mwms<__stable, true>
214 parallel_sort_mwms<false, false>
218 #if _GLIBCXX_QUICKSORT
223 #if _GLIBCXX_BAL_QUICKSORT
229 __gnu_sequential::sort(__begin, __end, __comp);
_Parallelism
Run-time equivalents for the compile-time tags.
static const _Settings & get()
Get the global settings.
Routines for checking the correctness of algorithm results. This file is a GNU parallel extension to ...
void __parallel_sort_qs(_RAIter __begin, _RAIter __end, _Compare __comp, _ThreadIndex __num_threads)
Unbalanced quicksort main call.
Recommends parallel execution at compile time, optionally using a user-specified number of threads...
Implementation of a dynamically load-balanced parallel quicksort.
#define _GLIBCXX_CALL(__n)
Macro to produce log message when entering a function.
Parallel multiway merge sort. This file is a GNU parallel extension to the Standard C++ Library...
End-user include file. Provides advanced settings and tuning options. This file is a GNU parallel ext...
Defines on whether to include algorithm variants.
Includes the original header files concerned with iterators except for stream iterators. This file is a GNU parallel extension to the Standard C++ Library.
Forces parallel sorting using balanced quicksort at compile time.
void __parallel_sort_qsb(_RAIter __begin, _RAIter __end, _Compare __comp, _ThreadIndex __num_threads)
Top-level quicksort routine.
Recommends parallel execution using the default parallel algorithm.
Forces parallel sorting using multiway mergesort with splitting by sampling at compile time...
_ThreadIndex __get_num_threads()
Find out desired number of threads.
Forces parallel sorting using unbalanced quicksort at compile time.
Implementation of a unbalanced parallel quicksort (in-place). This file is a GNU parallel extension t...
Forces parallel sorting using multiway mergesort at compile time.
Forces parallel sorting using multiway mergesort with exact splitting at compile time.