__gnu_parallel::_Settings(3cxx)
πΈ NAME πΈ
Welcome to the __gnu_parallel::_Settings(3cxx) page, bestie β part 1 of 2, and it's giving "control room for parallel mode."
__gnu_parallel::_Settings β the run-time settings class for parallel mode, packing all the tunable parameters into one iconic little vibe console.
β¨ SYNOPSIS β¨
#include <settings.h>
π Static Public Member Functions π
static const _Settings & get () throw ()β get the global settings, no cap.static void set (_Settings &) throw ()β set the global settings. Periodt.
π Public Attributes π
_SequenceIndex accumulate_minimal_nβ minimal input size foraccumulate.unsigned int adjacent_difference_minimal_nβ minimal input size foradjacent_difference._AlgorithmStrategy algorithm_strategyβ the manpage gives this one literally just the name, bestie.unsigned int cache_line_sizeβ an overestimation of the cache line size, used to dodge false sharing β i.e. elements from different threads are at least this amount apart._SequenceIndex count_minimal_nβ minimal input size forcountandcount_if._SequenceIndex fill_minimal_nβ minimal input size forfill._FindAlgorithm find_algorithmβ again, no extra blurb on this page; just the name.double find_increasing_factorβ block size increase factor forfind._SequenceIndex find_initial_block_sizeβ initial block size forfind._SequenceIndex find_maximum_block_sizeβ maximal block size forfind.float find_scale_factorβ block size scale-down factor with respect to current position._SequenceIndex find_sequential_search_sizeβ start by looking for this many elements sequentially, forfind._SequenceIndex for_each_minimal_nβ minimal input size forfor_each._SequenceIndex generate_minimal_nβ minimal input size forgenerate.unsigned long long L1_cache_sizeβ size of the L1 cache in bytes (underestimation).unsigned long long L2_cache_sizeβ size of the L2 cache in bytes (underestimation)._SequenceIndex max_element_minimal_nβ minimal input size formax_element._SequenceIndex merge_minimal_nβ minimal input size formerge.unsigned int merge_oversamplingβ oversampling factor formerge._SplittingAlgorithm merge_splittingβ no description here, just the name._SequenceIndex min_element_minimal_nβ minimal input size formin_element._MultiwayMergeAlgorithm multiway_merge_algorithmβ name only, bestie.int multiway_merge_minimal_kβ oversampling factor formultiway_merge._SequenceIndex multiway_merge_minimal_nβ minimal input size formultiway_merge.unsigned int multiway_merge_oversamplingβ oversampling factor formultiway_merge._SplittingAlgorithm multiway_merge_splittingβ just the name on this one._SequenceIndex nth_element_minimal_nβ minimal input size fornth_element._SequenceIndex partial_sort_minimal_nβ minimal input size forpartial_sort._PartialSumAlgorithm partial_sum_algorithmβ name only, no extra tea.float partial_sum_dilationβ ratio forpartial_sum. Assume 'sum and write result' to be this factor slower than just 'sum'.unsigned int partial_sum_minimal_nβ minimal input size forpartial_sum.double partition_chunk_shareβ chunk size for partition, relative to input size. If> 0.0, this value overridespartition_chunk_size._SequenceIndex partition_chunk_sizeβ chunk size for partition._SequenceIndex partition_minimal_nβ minimal input size for partition._SequenceIndex qsb_stealsβ the number of stolen ranges in load-balanced quicksort.unsigned int random_shuffle_minimal_nβ minimal input size forrandom_shuffle._SequenceIndex replace_minimal_nβ minimal input size forreplaceandreplace_if._SequenceIndex search_minimal_nβ minimal input size forsearchandsearch_n._SequenceIndex set_difference_minimal_nβ minimal input size forset_difference._SequenceIndex set_intersection_minimal_nβ minimal input size forset_intersection._SequenceIndex set_symmetric_difference_minimal_nβ minimal input size forset_symmetric_difference._SequenceIndex set_union_minimal_nβ minimal input size forset_union._SortAlgorithm sort_algorithmβ name only, iykyk._SequenceIndex sort_minimal_nβ minimal input size for parallel sorting.unsigned int sort_mwms_oversamplingβ oversampling factor for parallelstd::sort(MWMS).unsigned int sort_qs_num_samples_presetβ such many samples to take to find a good pivot (quicksort)._SequenceIndex sort_qsb_base_case_maximal_nβ maximal subsequence__lengthto switch to unbalanced__base case. Applies tostd::sortwith dynamically load-balanced quicksort._SplittingAlgorithm sort_splittingβ just the name, bestie.unsigned int TLB_sizeβ size of the Translation Lookaside Buffer (underestimation)._SequenceIndex transform_minimal_nβ minimal input size for parallelstd::transform._SequenceIndex unique_copy_minimal_nβ minimal input size forunique_copy._SequenceIndex workstealing_chunk_sizeβ no description on this page, just the name.
π Detailed Description π
So _Settings is the class for run-time settings for the parallel mode, and it includes all the tunable parameters. All of them. Every single knob. It's the main character of "where do I change that value," fr fr.
π«Ά Member Function Documentation π«Ά
π static const _Settings & __gnu_parallel::_Settings::get () [static] π
static const _Settings & get () throw () β get the global settings. That's the whole job, and it ate.
The page says this is referenced by:
__gnu_parallel::__find_template()__gnu_parallel::__find_template()__gnu_parallel::__find_template()__gnu_parallel::__for_each_template_random_access_workstealing()__gnu_parallel::__parallel_nth_element()__gnu_parallel::__parallel_partial_sum()__gnu_parallel::__parallel_partial_sum_linear()__gnu_parallel::__parallel_partition()__gnu_parallel::__parallel_random_shuffle_drs()__gnu_parallel::__parallel_sort()__gnu_parallel::__parallel_sort()__gnu_parallel::__parallel_sort_qs_conquer()__gnu_parallel::__qsb_local_sort_with_helping()__gnu_parallel::__sequential_random_shuffle()__gnu_parallel::multiway_merge_sampling_splitting()__gnu_parallel::parallel_multiway_merge()__gnu_parallel::parallel_sort_mwms()__gnu_parallel::parallel_sort_mwms_pu()
π static void __gnu_parallel::_Settings::set (_Settings &) [static] π
static void set (_Settings &) throw () β set the global settings. Simple, clean, iconic.
β¨ Member Data Documentation β¨
Okay bestie, this is the good part β all the actual knobs and dials on __gnu_parallel::_Settings. Every single one, no skips, we're doing the full tour π
_SequenceIndex__gnu_parallel::_Settings::accumulate_minimal_nβ the minimal input size foraccumulate. Below this, it's just not worth the parallel drama πunsigned int__gnu_parallel::_Settings::adjacent_difference_minimal_nβ minimal input size foradjacent_difference.unsigned int__gnu_parallel::_Settings::cache_line_sizeβ an overestimation of the cache line size. It's used to dodge false sharing, i.e. making sure elements belonging to different threads sit at least this far apart π¦- Referenced by
__gnu_parallel::__for_each_template_random_access_workstealing().
- Referenced by
_SequenceIndex__gnu_parallel::_Settings::count_minimal_nβ minimal input size forcountandcount_if._SequenceIndex__gnu_parallel::_Settings::fill_minimal_nβ minimal input size forfill.double__gnu_parallel::_Settings::find_increasing_factorβ the block size increase factor forfind._SequenceIndex__gnu_parallel::_Settings::find_initial_block_sizeβ the initial block size forfind.- Referenced by
__gnu_parallel::__find_template().
- Referenced by
_SequenceIndex__gnu_parallel::_Settings::find_maximum_block_sizeβ the maximal block size forfind.float__gnu_parallel::_Settings::find_scale_factorβ block size scale-down factor with respect to the current position.- Referenced by
__gnu_parallel::__find_template().
- Referenced by
_SequenceIndex__gnu_parallel::_Settings::find_sequential_search_sizeβ start off by looking for this many elements sequentially, forfind.- Referenced by
__gnu_parallel::__find_template(), and__gnu_parallel::__find_template().
- Referenced by
_SequenceIndex__gnu_parallel::_Settings::for_each_minimal_nβ minimal input size forfor_each._SequenceIndex__gnu_parallel::_Settings::generate_minimal_nβ minimal input size forgenerate.unsigned long long__gnu_parallel::_Settings::L1_cache_sizeβ size of the L1 cache in bytes (underestimation, so it lowballs it on purpose π).unsigned long long__gnu_parallel::_Settings::L2_cache_sizeβ size of the L2 cache in bytes (underestimation, same deal).- Referenced by
__gnu_parallel::__parallel_random_shuffle_drs(), and__gnu_parallel::__sequential_random_shuffle().
- Referenced by
_SequenceIndex__gnu_parallel::_Settings::max_element_minimal_nβ minimal input size formax_element._SequenceIndex__gnu_parallel::_Settings::merge_minimal_nβ minimal input size formerge.unsigned int__gnu_parallel::_Settings::merge_oversamplingβ oversampling factor formerge.- Referenced by
__gnu_parallel::multiway_merge_sampling_splitting(), and__gnu_parallel::parallel_multiway_merge().
- Referenced by
_SequenceIndex__gnu_parallel::_Settings::min_element_minimal_nβ minimal input size formin_element.int__gnu_parallel::_Settings::multiway_merge_minimal_kβ oversampling factor formultiway_merge._SequenceIndex__gnu_parallel::_Settings::multiway_merge_minimal_nβ minimal input size formultiway_merge.unsigned int__gnu_parallel::_Settings::multiway_merge_oversamplingβ oversampling factor formultiway_merge._SequenceIndex__gnu_parallel::_Settings::nth_element_minimal_nβ minimal input size fornth_element.- Referenced by
__gnu_parallel::__parallel_nth_element().
- Referenced by
_SequenceIndex__gnu_parallel::_Settings::partial_sort_minimal_nβ minimal input size forpartial_sort.float__gnu_parallel::_Settings::partial_sum_dilationβ ratio forpartial_sum. Basically it assumes that "sum and write result" is this factor slower than just plain "sum" π- Referenced by
__gnu_parallel::__parallel_partial_sum_linear().
- Referenced by
unsigned int__gnu_parallel::_Settings::partial_sum_minimal_nβ minimal input size forpartial_sum.double__gnu_parallel::_Settings::partition_chunk_shareβ chunk size for partition, relative to input size. Heads up: if it's> 0.0, this value overridespartition_chunk_sizeπ- Referenced by
__gnu_parallel::__parallel_partition().
- Referenced by
_SequenceIndex__gnu_parallel::_Settings::partition_chunk_sizeβ chunk size for partition.- Referenced by
__gnu_parallel::__parallel_partition().
- Referenced by
_SequenceIndex__gnu_parallel::_Settings::partition_minimal_nβ minimal input size for partition.- Referenced by
__gnu_parallel::__parallel_nth_element().
- Referenced by
_SequenceIndex__gnu_parallel::_Settings::qsb_stealsβ the number of stolen ranges in load-balanced quicksort. stealing is literally the whole personality of this algorithm ngl πunsigned int__gnu_parallel::_Settings::random_shuffle_minimal_nβ minimal input size forrandom_shuffle._SequenceIndex__gnu_parallel::_Settings::replace_minimal_nβ minimal input size forreplaceandreplace_if._SequenceIndex__gnu_parallel::_Settings::search_minimal_nβ minimal input size forsearchandsearch_n._SequenceIndex__gnu_parallel::_Settings::set_difference_minimal_nβ minimal input size forset_difference._SequenceIndex__gnu_parallel::_Settings::set_intersection_minimal_nβ minimal input size forset_intersection._SequenceIndex__gnu_parallel::_Settings::set_symmetric_difference_minimal_nβ minimal input size forset_symmetric_difference._SequenceIndex__gnu_parallel::_Settings::set_union_minimal_nβ minimal input size forset_union._SequenceIndex__gnu_parallel::_Settings::sort_minimal_nβ minimal input size for parallel sorting.unsigned int__gnu_parallel::_Settings::sort_mwms_oversamplingβ oversampling factor for parallelstd::sort(MWMS).- Referenced by
__gnu_parallel::parallel_sort_mwms(), and__gnu_parallel::parallel_sort_mwms_pu().
- Referenced by
unsigned int__gnu_parallel::_Settings::sort_qs_num_samples_presetβ this many samples to take to find a good pivot (quicksort) π―_SequenceIndex__gnu_parallel::_Settings::sort_qsb_base_case_maximal_nβ maximal subsequence__lengthto switch to the unbalanced__base case. Applies tostd::sortwith dynamically load-balanced quicksort.- Referenced by
__gnu_parallel::__qsb_local_sort_with_helping().
- Referenced by
unsigned int__gnu_parallel::_Settings::TLB_sizeβ size of the Translation Lookaside Buffer (underestimation).- Referenced by
__gnu_parallel::__parallel_random_shuffle_drs(), and__gnu_parallel::__sequential_random_shuffle().
- Referenced by
_SequenceIndex__gnu_parallel::_Settings::transform_minimal_nβ minimal input size for parallelstd::transform._SequenceIndex__gnu_parallel::_Settings::unique_copy_minimal_nβ minimal input size forunique_copy.
πΈ Author πΈ
Generated automatically by Doxygen for libstdc++ from the source code. no cap, nobody hand-wrote this one, the machine did it π
okay that's the whole page bestie, you ate that π«Άβ¨ This lil doc shipped as part of libstdc++, in the __gnu_parallel::_Settings(3cxx) manual page (3cxx section) β go be iconic with your settings, mwah π
π
π¦ where this page comes from
- debian trixie: libstdc++-12-doc 12.4.0-5
- debian trixie: libstdc++-13-doc 13.3.0-16
- debian trixie: libstdc++-14-doc 14.2.0-19
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2.1
- ubuntu noble: libstdc++-11-doc 11.4.0-9ubuntu1
- ubuntu noble: libstdc++-11-doc 11.5.0-1ubuntu1~24.04.1
- ubuntu noble: libstdc++-12-doc 12.3.0-17ubuntu1
- ubuntu noble: libstdc++-12-doc 12.4.0-2ubuntu1~24.04.1
- ubuntu noble: libstdc++-13-doc 13.2.0-23ubuntu4
- ubuntu noble: libstdc++-13-doc 13.3.0-6ubuntu2~24.04.1
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- ubuntu noble: libstdc++-14-doc 14.2.0-4ubuntu2~24.04.1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1.1
- ubuntu questing: libstdc++-12-doc 12.5.0-6ubuntu1
- ubuntu questing: libstdc++-13-doc 13.4.0-4ubuntu1
- ubuntu questing: libstdc++-14-doc 14.3.0-8ubuntu1
- ubuntu questing: libstdc++-15-doc 15.2.0-4ubuntu4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms