__GNU_PARALLEL::_SETTINGS(3)
π __gnu_parallel::_Settings(3) π
okay so this is the __gnu_parallel::_Settings(3) page from the Library Functions Manual, and it's literally the settings class for parallel mode. No cap, it's giving βtunable parametersβ energy β¨
πΈ NAME πΈ
__gnu_parallel::_Settings β class _Settings. Run-time settings for the parallel mode including all tunable parameters.
β¨ SYNOPSIS β¨
#include <settings.h>
π Static Public Member Functions
static const _Settings & get () throw ()β Get the global settings.static void set (_Settings &) throw ()β Set the global settings.
π Public Attributes
_SequenceIndex accumulate_minimal_nβ Minimal input size for accumulate.unsigned int adjacent_difference_minimal_nβ Minimal input size for adjacent_difference._AlgorithmStrategy algorithm_strategyunsigned int cache_line_sizeβ Overestimation of cache line size. Used to avoid false sharing, i.e. elements of different threads are at least this amount apart._SequenceIndex count_minimal_nβ Minimal input size for count and count_if._SequenceIndex fill_minimal_nβ Minimal input size for fill._FindAlgorithm find_algorithmdouble find_increasing_factorβ Block size increase factor for find._SequenceIndex find_initial_block_sizeβ Initial block size for find._SequenceIndex find_maximum_block_sizeβ Maximal block size for find.float find_scale_factorβ Block size scale-down factor with respect to current position._SequenceIndex find_sequential_search_sizeβ Start with looking for this many elements sequentially, for find._SequenceIndex for_each_minimal_nβ Minimal input size for for_each._SequenceIndex generate_minimal_nβ Minimal input size for generate.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 for max_element._SequenceIndex merge_minimal_nβ Minimal input size for merge.unsigned int merge_oversamplingβ Oversampling factor for merge._SplittingAlgorithm merge_splitting_SequenceIndex min_element_minimal_nβ Minimal input size for min_element._MultiwayMergeAlgorithm multiway_merge_algorithmint multiway_merge_minimal_kβ Oversampling factor for multiway_merge._SequenceIndex multiway_merge_minimal_nβ Minimal input size for multiway_merge.unsigned int multiway_merge_oversamplingβ Oversampling factor for multiway_merge._SplittingAlgorithm multiway_merge_splitting_SequenceIndex nth_element_minimal_nβ Minimal input size for nth_element._SequenceIndex partial_sort_minimal_nβ Minimal input size for partial_sort._PartialSumAlgorithm partial_sum_algorithmfloat partial_sum_dilationβ Ratio forpartial_sum. Assumesumandwriteresult"tobethisfactorslowerthanjustsum.unsigned int partial_sum_minimal_nβ Minimal input size for partial_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 for random_shuffle._SequenceIndex replace_minimal_nβ Minimal input size for replace and replace_if._SequenceIndex search_minimal_nβ Minimal input size for search and search_n._SequenceIndex set_difference_minimal_nβ Minimal input size for set_difference._SequenceIndex set_intersection_minimal_nβ Minimal input size for set_intersection._SequenceIndex set_symmetric_difference_minimal_nβ Minimal input size for set_symmetric_difference._SequenceIndex set_union_minimal_nβ Minimal input size for set_union._SortAlgorithm sort_algorithm_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__basecase. Applies tostd::sortwith dynamically load-balanced quicksort._SplittingAlgorithm sort_splittingunsigned 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 for unique_copy._SequenceIndex workstealing_chunk_size
π₯ Detailed Description π₯
class _Settings Run-time settings for the parallel mode including all tunable parameters.
π Member Function Documentation π
π const _Settings & __gnu_parallel::_Settings::get () [static]
Get the global settings.
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()
π
void __gnu_parallel::_Settings::set (_Settings & ) [static]
Set the global settings.
References:
accumulate_minimal_nadjacent_difference_minimal_ncache_line_sizecount_minimal_nfill_minimal_nfind_increasing_factorfind_initial_block_sizefind_maximum_block_sizefind_scale_factorfind_sequential_search_sizefor_each_minimal_ngenerate_minimal_nL1_cache_sizeL2_cache_sizemax_element_minimal_nmerge_minimal_nmerge_oversamplingmin_element_minimal_nmultiway_merge_minimal_kmultiway_merge_minimal_nmultiway_merge_oversamplingnth_element_minimal_npartial_sort_minimal_npartial_sum_dilationpartial_sum_minimal_npartition_chunk_sharepartition_chunk_sizepartition_minimal_nqsb_stealsrandom_shuffle_minimal_nreplace_minimal_nsearch_minimal_nset()set_difference_minimal_nset_intersection_minimal_nset_symmetric_difference_minimal_nset_union_minimal_nsort_minimal_nsort_mwms_oversamplingsort_qs_num_samples_presetsort_qsb_base_case_maximal_nTLB_sizetransform_minimal_nunique_copy_minimal_n
Referenced by set().
β¨ Member Data Documentation β¨
okay bestie, THIS is the part everyone actually came for π β every single knob on _Settings, what it controls, and which internal function is out here reading it. These are the fields set() goes and fills in. No skipping, we're doing all of them, periodt. π«Ά
_SequenceIndex __gnu_parallel::_Settings::accumulate_minimal_nβ the smallest input size that's even worth it foraccumulate. Under this? it's not gonna bother. Referenced byset(). πunsigned int __gnu_parallel::_Settings::adjacent_difference_minimal_nβ minimal input size foradjacent_difference. Referenced byset(). β¨unsigned int __gnu_parallel::_Settings::cache_line_sizeβ a lil overestimate of the cache line size. It's there to dodge false sharing β basically, elements belonging to different threads get kept at least this far apart so they stop fighting over the same cache line π€. Referenced by__gnu_parallel::__for_each_template_random_access_workstealing(), andset(). π₯_SequenceIndex __gnu_parallel::_Settings::count_minimal_nβ minimal input size forcountandcount_if. Referenced byset(). π_SequenceIndex __gnu_parallel::_Settings::fill_minimal_nβ minimal input size forfill. Referenced byset(). πΈdouble __gnu_parallel::_Settings::find_increasing_factorβ the block size increase factor forfind. Referenced byset(). π¦_SequenceIndex __gnu_parallel::_Settings::find_initial_block_sizeβ the initial block size forfind. Referenced by__gnu_parallel::__find_template(), andset(). β_SequenceIndex __gnu_parallel::_Settings::find_maximum_block_sizeβ the maximal block size forfind. Referenced byset(). πfloat __gnu_parallel::_Settings::find_scale_factorβ block size scale-down factor, relative to where you currently are. Referenced by__gnu_parallel::__find_template(), andset(). π§_SequenceIndex __gnu_parallel::_Settings::find_sequential_search_sizeβ start off by looking for this many elements sequentially, forfind. Referenced by__gnu_parallel::__find_template(),__gnu_parallel::__find_template(), andset()(yep,__find_template()is listed twice in the source, that's just how it is, don't @ me π). π_SequenceIndex __gnu_parallel::_Settings::for_each_minimal_nβ minimal input size forfor_each. Referenced byset(). π_SequenceIndex __gnu_parallel::_Settings::generate_minimal_nβ minimal input size forgenerate. Referenced byset(). πunsigned long long __gnu_parallel::_Settings::L1_cache_sizeβ the size of the L1 cache in bytes (and it's an *under*estimation, so we're being modest here π₯Ί). Referenced byset(). β¨unsigned long long __gnu_parallel::_Settings::L2_cache_sizeβ the size of the L2 cache in bytes (also an underestimation). Referenced by__gnu_parallel::__parallel_random_shuffle_drs(),__gnu_parallel::__sequential_random_shuffle(), andset(). π₯_SequenceIndex __gnu_parallel::_Settings::max_element_minimal_nβ minimal input size formax_element. Referenced byset(). π_SequenceIndex __gnu_parallel::_Settings::merge_minimal_nβ minimal input size formerge. Referenced byset(). πΈunsigned int __gnu_parallel::_Settings::merge_oversamplingβ the oversampling factor formerge. Referenced by__gnu_parallel::multiway_merge_sampling_splitting(),__gnu_parallel::parallel_multiway_merge(), andset(). π¦_SequenceIndex __gnu_parallel::_Settings::min_element_minimal_nβ minimal input size formin_element. Referenced byset(). βint __gnu_parallel::_Settings::multiway_merge_minimal_kβ oversampling factor formultiway_merge. Referenced byset(). π_SequenceIndex __gnu_parallel::_Settings::multiway_merge_minimal_nβ minimal input size formultiway_merge. Referenced byset(). π§unsigned int __gnu_parallel::_Settings::multiway_merge_oversamplingβ oversampling factor formultiway_merge. Referenced byset(). π_SequenceIndex __gnu_parallel::_Settings::nth_element_minimal_nβ minimal input size fornth_element. Referenced by__gnu_parallel::__parallel_nth_element(), andset(). π_SequenceIndex __gnu_parallel::_Settings::partial_sort_minimal_nβ minimal input size forpartial_sort. Referenced byset(). πfloat __gnu_parallel::_Settings::partial_sum_dilationβ a ratio forpartial_sum. It assumes that "sum and write result" is this factor slower than just plain "sum". Referenced by__gnu_parallel::__parallel_partial_sum_linear(), andset(). β¨unsigned int __gnu_parallel::_Settings::partial_sum_minimal_nβ minimal input size forpartial_sum. Referenced byset(). π₯double __gnu_parallel::_Settings::partition_chunk_shareβ the chunk size forpartition, relative to the input size. And listen: if it's> 0.0, this value overridespartition_chunk_size. Main character energy, honestly π . Referenced by__gnu_parallel::__parallel_partition(), andset(). π_SequenceIndex __gnu_parallel::_Settings::partition_chunk_sizeβ the chunk size forpartition. Referenced by__gnu_parallel::__parallel_partition(), andset(). πΈ_SequenceIndex __gnu_parallel::_Settings::partition_minimal_nβ minimal input size forpartition. Referenced by__gnu_parallel::__parallel_nth_element(), andset(). π¦_SequenceIndex __gnu_parallel::_Settings::qsb_stealsβ the number of stolen ranges in load-balanced quicksort. Referenced byset(). βunsigned int __gnu_parallel::_Settings::random_shuffle_minimal_nβ minimal input size forrandom_shuffle. Referenced byset(). π_SequenceIndex __gnu_parallel::_Settings::replace_minimal_nβ minimal input size forreplaceandreplace_if. Referenced byset(). π§_SequenceIndex __gnu_parallel::_Settings::search_minimal_nβ minimal input size forsearchandsearch_n. Referenced byset(). π_SequenceIndex __gnu_parallel::_Settings::set_difference_minimal_nβ minimal input size forset_difference. Referenced byset(). π_SequenceIndex __gnu_parallel::_Settings::set_intersection_minimal_nβ minimal input size forset_intersection. Referenced byset(). π_SequenceIndex __gnu_parallel::_Settings::set_symmetric_difference_minimal_nβ minimal input size forset_symmetric_difference. Referenced byset(). β¨_SequenceIndex __gnu_parallel::_Settings::set_union_minimal_nβ minimal input size forset_union. Referenced byset(). π₯_SequenceIndex __gnu_parallel::_Settings::sort_minimal_nβ minimal input size for parallel sorting. Referenced byset(). πunsigned int __gnu_parallel::_Settings::sort_mwms_oversamplingβ oversampling factor for parallelstd::sort(MWMS). Referenced by__gnu_parallel::parallel_sort_mwms(),__gnu_parallel::parallel_sort_mwms_pu(), andset(). πΈunsigned int __gnu_parallel::_Settings::sort_qs_num_samples_presetβ take this many samples to go find a good pivot (quicksort). Referenced byset(). π¦_SequenceIndex __gnu_parallel::_Settings::sort_qsb_base_case_maximal_nβ the maximal subsequence__lengthto switch over to the unbalanced__base case. This one applies tostd::sortwith dynamically load-balanced quicksort. Referenced by__gnu_parallel::__qsb_local_sort_with_helping(), andset(). βunsigned int __gnu_parallel::_Settings::TLB_sizeβ the size of the Translation Lookaside Buffer (underestimation again, humble queen π₯Ί). Referenced by__gnu_parallel::__parallel_random_shuffle_drs(),__gnu_parallel::__sequential_random_shuffle(), andset(). π_SequenceIndex __gnu_parallel::_Settings::transform_minimal_nβ minimal input size for parallelstd::transform. Referenced byset(). π§_SequenceIndex __gnu_parallel::_Settings::unique_copy_minimal_nβ minimal input size forunique_copy. Referenced byset(). π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. π (yes, the docs literally wrote themselves, and they ate π½οΈ)
and that's a wrap on__gnu_para...::_Settings(3), bestie π that lil footer down there is just thelibstdc++manpage stamp with the page name and its date β you made it to the end, so go take a nap, you've earned it β¨π π«Ά
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms