83 #ifndef _GLIBCXX_PARALLEL_SETTINGS_H
84 #define _GLIBCXX_PARALLEL_SETTINGS_H 1
95 #define _GLIBCXX_PARALLEL_CONDITION(__c) \
96 (__gnu_parallel::_Settings::get().algorithm_strategy \
97 != __gnu_parallel::force_sequential \
98 && ((__gnu_parallel::__get_max_threads() > 1 && (__c)) \
99 || __gnu_parallel::_Settings::get().algorithm_strategy \
100 == __gnu_parallel::force_parallel))
288 algorithm_strategy(heuristic),
289 sort_algorithm(MWMS),
290 partial_sum_algorithm(LINEAR),
291 multiway_merge_algorithm(LOSER_TREE),
292 find_algorithm(CONSTANT_SIZE_BLOCKS),
293 sort_splitting(EXACT),
294 merge_splitting(EXACT),
295 multiway_merge_splitting(EXACT),
296 accumulate_minimal_n(1000),
297 adjacent_difference_minimal_n(1000),
298 count_minimal_n(1000),
299 fill_minimal_n(1000),
300 find_increasing_factor(2.0),
301 find_initial_block_size(256),
302 find_maximum_block_size(8192),
303 find_sequential_search_size(256),
304 for_each_minimal_n(1000),
305 generate_minimal_n(1000),
306 max_element_minimal_n(1000),
307 merge_minimal_n(1000),
308 merge_oversampling(10),
309 min_element_minimal_n(1000),
310 multiway_merge_minimal_n(1000),
311 multiway_merge_minimal_k(2), multiway_merge_oversampling(10),
312 nth_element_minimal_n(1000),
313 partition_chunk_size(1000),
314 partition_chunk_share(0.0),
315 partition_minimal_n(1000),
316 partial_sort_minimal_n(1000),
317 partial_sum_dilation(1.0f),
318 partial_sum_minimal_n(1000),
319 random_shuffle_minimal_n(1000),
320 replace_minimal_n(1000),
321 set_difference_minimal_n(1000),
322 set_intersection_minimal_n(1000),
323 set_symmetric_difference_minimal_n(1000),
324 set_union_minimal_n(1000),
325 sort_minimal_n(1000),
326 sort_mwms_oversampling(10),
327 sort_qs_num_samples_preset(100),
328 sort_qsb_base_case_maximal_n(100),
329 transform_minimal_n(1000),
330 unique_copy_minimal_n(10000),
331 workstealing_chunk_size(100),
332 L1_cache_size(16 << 10),
333 L2_cache_size(256 << 10),
337 search_minimal_n(1000),
338 find_scale_factor(0.01f)
float find_scale_factor
Block size scale-down factor with respect to current position.
_SequenceIndex find_initial_block_size
Initial block size for find.
_SequenceIndex set_symmetric_difference_minimal_n
Minimal input size for set_symmetric_difference.
_SequenceIndex search_minimal_n
Minimal input size for search and search_n.
unsigned int multiway_merge_oversampling
Oversampling factor for multiway_merge.
_SequenceIndex partition_chunk_size
Chunk size for partition.
class _Settings Run-time settings for the parallel mode including all tunable parameters.
_SplittingAlgorithm
Sorting/merging algorithms: sampling, __exact.
_SequenceIndex for_each_minimal_n
Minimal input size for for_each.
double partition_chunk_share
Chunk size for partition, relative to input size. If > 0.0, this value overrides partition_chunk_size...
_SortAlgorithm
Sorting algorithms:
unsigned int sort_mwms_oversampling
Oversampling factor for parallel std::sort (MWMS).
_SequenceIndex set_intersection_minimal_n
Minimal input size for set_intersection.
_SequenceIndex qsb_steals
The number of stolen ranges in load-balanced quicksort.
unsigned long long L2_cache_size
size of the L2 cache in bytes (underestimation).
_SequenceIndex find_sequential_search_size
Start with looking for this many elements sequentially, for find.
_SequenceIndex fill_minimal_n
Minimal input size for fill.
unsigned long long L1_cache_size
size of the L1 cache in bytes (underestimation).
unsigned int merge_oversampling
Oversampling factor for merge.
_FindAlgorithm
Find algorithms:
uint64_t _SequenceIndex
Unsigned integer to index __elements. The total number of elements for each algorithm must fit into t...
_SequenceIndex sort_qsb_base_case_maximal_n
Maximal subsequence __length to switch to unbalanced __base case. Applies to std::sort with dynamical...
double find_increasing_factor
Block size increase factor for find.
_AlgorithmStrategy
Strategies for run-time algorithm selection:
_SequenceIndex transform_minimal_n
Minimal input size for parallel std::transform.
_SequenceIndex partition_minimal_n
Minimal input size for partition.
_SequenceIndex partial_sort_minimal_n
Minimal input size for partial_sort.
_SequenceIndex set_union_minimal_n
Minimal input size for set_union.
_SequenceIndex merge_minimal_n
Minimal input size for merge.
float partial_sum_dilation
Ratio for partial_sum. Assume "sum and write result" to be this factor slower than just "sum"...
unsigned int random_shuffle_minimal_n
Minimal input size for random_shuffle.
_SequenceIndex accumulate_minimal_n
Minimal input size for accumulate.
unsigned int cache_line_size
Overestimation of cache line size. Used to avoid false sharing, i.e. elements of different threads ar...
static void set(_Settings &)
Set the global settings.
unsigned int sort_qs_num_samples_preset
Such many samples to take to find a good pivot (quicksort).
_SequenceIndex generate_minimal_n
Minimal input size for generate.
Basic types and typedefs. This file is a GNU parallel extension to the Standard C++ Library...
_SequenceIndex nth_element_minimal_n
Minimal input size for nth_element.
GNU parallel code for public use.
_SequenceIndex replace_minimal_n
Minimal input size for replace and replace_if.
unsigned int partial_sum_minimal_n
Minimal input size for partial_sum.
_SequenceIndex max_element_minimal_n
Minimal input size for max_element.
int multiway_merge_minimal_k
Oversampling factor for multiway_merge.
unsigned int TLB_size
size of the Translation Lookaside Buffer (underestimation).
_SequenceIndex find_maximum_block_size
Maximal block size for find.
_SequenceIndex min_element_minimal_n
Minimal input size for min_element.
_SequenceIndex count_minimal_n
Minimal input size for count and count_if.
_SequenceIndex multiway_merge_minimal_n
Minimal input size for multiway_merge.
_SequenceIndex unique_copy_minimal_n
Minimal input size for unique_copy.
unsigned int adjacent_difference_minimal_n
Minimal input size for adjacent_difference.
_SequenceIndex sort_minimal_n
Minimal input size for parallel sorting.
_SequenceIndex set_difference_minimal_n
Minimal input size for set_difference.
_PartialSumAlgorithm
Partial sum algorithms: recursive, linear.
_MultiwayMergeAlgorithm
Merging algorithms: