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,
73 template<
bool __stable,
typename _RAIter,
typename _Compare>
75 __parallel_sort(_RAIter __begin, _RAIter __end,
81 parallel_sort_mwms<__stable, true>
84 parallel_sort_mwms<__stable, false>
97 template<
bool __stable,
typename _RAIter,
typename _Compare>
99 __parallel_sort(_RAIter __begin, _RAIter __end,
105 parallel_sort_mwms<__stable, true>
118 template<
bool __stable,
typename _RAIter,
typename _Compare>
120 __parallel_sort(_RAIter __begin, _RAIter __end,
126 parallel_sort_mwms<__stable, false>
138 template<
bool __stable,
typename _RAIter,
typename _Compare>
140 __parallel_sort(_RAIter __begin, _RAIter __end,
145 _GLIBCXX_PARALLEL_ASSERT(__stable ==
false);
159 template<
bool __stable,
typename _RAIter,
typename _Compare>
161 __parallel_sort(_RAIter __begin, _RAIter __end,
166 _GLIBCXX_PARALLEL_ASSERT(__stable ==
false);
181 template<
bool __stable,
typename _RAIter,
typename _Compare>
183 __parallel_sort(_RAIter __begin, _RAIter __end,
188 __parallel_sort<__stable>
189 (__begin, __end, __comp,
201 template<
bool __stable,
typename _RAIter,
typename _Compare>
203 __parallel_sort(_RAIter __begin, _RAIter __end,
207 typedef std::iterator_traits<_RAIter> _TraitsType;
208 typedef typename _TraitsType::value_type _ValueType;
209 typedef typename _TraitsType::difference_type _DifferenceType;
212 #if _GLIBCXX_MERGESORT
216 parallel_sort_mwms<__stable, true>
219 parallel_sort_mwms<false, false>
223 #if _GLIBCXX_QUICKSORT
228 #if _GLIBCXX_BAL_QUICKSORT
234 __gnu_sequential::sort(__begin, __end, __comp);
static const _Settings & get()
Get the global settings.
_ThreadIndex __get_num_threads()
Find out desired number of threads.
Forces parallel sorting using balanced quicksort at compile time.
Implementation of a dynamically load-balanced parallel quicksort.
Parallel multiway merge sort. This file is a GNU parallel extension to the Standard C++ Library...
Forces parallel sorting using multiway mergesort with exact splitting at compile time.
Forces parallel sorting using unbalanced quicksort at compile time.
_Parallelism
Run-time equivalents for the compile-time tags.
Defines on whether to include algorithm variants.
Recommends parallel execution at compile time, optionally using a user-specified number of threads...
Forces parallel sorting using multiway mergesort at compile time.
Routines for checking the correctness of algorithm results. This file is a GNU parallel extension to ...
#define _GLIBCXX_CALL(__n)
Macro to produce log message when entering a function.
End-user include file. Provides advanced settings and tuning options. This file is a GNU parallel ext...
Forces parallel sorting using multiway mergesort with splitting by sampling at compile time...
Implementation of a unbalanced parallel quicksort (in-place). This file is a GNU parallel extension t...
void __parallel_sort_qsb(_RAIter __begin, _RAIter __end, _Compare __comp, _ThreadIndex __num_threads)
Top-level quicksort routine.
void __parallel_sort_qs(_RAIter __begin, _RAIter __end, _Compare __comp, _ThreadIndex __num_threads)
Unbalanced quicksort main call.
Includes the original header files concerned with iterators except for stream iterators. This file is a GNU parallel extension to the Standard C++ Library.
Recommends parallel execution using the default parallel algorithm.