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 RandomAccessIterator,
59 typename Comparator,
typename Parallelism>
61 parallel_sort(RandomAccessIterator begin, RandomAccessIterator end,
62 Comparator comp, Parallelism parallelism);
72 template<
bool stable,
typename RandomAccessIterator,
typename Comparator>
74 parallel_sort(RandomAccessIterator begin, RandomAccessIterator end,
80 parallel_sort_mwms<stable, true>
83 parallel_sort_mwms<stable, false>
95 template<
bool stable,
typename RandomAccessIterator,
typename Comparator>
97 parallel_sort(RandomAccessIterator begin, RandomAccessIterator end,
102 parallel_sort_mwms<stable, true>
114 template<
bool stable,
typename RandomAccessIterator,
typename Comparator>
116 parallel_sort(RandomAccessIterator begin, RandomAccessIterator end,
121 parallel_sort_mwms<stable, false>
132 template<
bool stable,
typename RandomAccessIterator,
typename Comparator>
134 parallel_sort(RandomAccessIterator begin, RandomAccessIterator end,
139 _GLIBCXX_PARALLEL_ASSERT(stable ==
false);
152 template<
bool stable,
typename RandomAccessIterator,
typename Comparator>
154 parallel_sort(RandomAccessIterator begin, RandomAccessIterator end,
159 _GLIBCXX_PARALLEL_ASSERT(stable ==
false);
173 template<
bool stable,
typename RandomAccessIterator,
typename Comparator>
175 parallel_sort(RandomAccessIterator begin, RandomAccessIterator end,
180 parallel_sort<stable>
194 template<
bool stable,
typename RandomAccessIterator,
typename Comparator>
196 parallel_sort(RandomAccessIterator begin, RandomAccessIterator end,
201 typedef typename traits_type::value_type value_type;
202 typedef typename traits_type::difference_type difference_type;
205 #if _GLIBCXX_MERGESORT
209 parallel_sort_mwms<stable, true>
212 parallel_sort_mwms<false, false>
216 #if _GLIBCXX_QUICKSORT
220 #if _GLIBCXX_BAL_QUICKSORT
225 __gnu_sequential::sort(begin, end, comp);
static const _Settings & get()
Get the global settings.
Forces parallel sorting using multiway mergesort at compile time.
Defines on whether to include algorithm variants.
Implementation of a unbalanced parallel quicksort (in-place). This file is a GNU parallel extension t...
Parallel multiway merge sort. This file is a GNU parallel extension to the Standard C++ Library...
Forces parallel sorting using balanced quicksort at compile time.
Forces parallel sorting using multiway mergesort with splitting by sampling at compile time...
void parallel_sort_qs(RandomAccessIterator begin, RandomAccessIterator end, Comparator comp, thread_index_t num_threads)
Unbalanced quicksort main call.
Recommends parallel execution at compile time, optionally using a user-specified number of threads...
End-user include file. Provides advanced settings and tuning options. This file is a GNU parallel ext...
Forces parallel sorting using multiway mergesort with exact splitting at compile time.
Implementation of a dynamically load-balanced parallel quicksort.
Recommends parallel execution using the default parallel algorithm.
void parallel_sort_qsb(RandomAccessIterator begin, RandomAccessIterator end, Comparator comp, thread_index_t num_threads)
Top-level quicksort routine.
Forces parallel sorting using unbalanced quicksort at compile time.
thread_index_t get_num_threads()
Find out desired number of threads.
Includes the original header files concerned with iterators except for stream iterators. This file is a GNU parallel extension to the Standard C++ Library.
#define _GLIBCXX_CALL(n)
Macro to produce log message when entering a function.
Routines for checking the correctness of algorithm results. This file is a GNU parallel extension to ...