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