Boost.Sort: I:/modular-boost/libs/sort/include/boost/sort/spreadsort/detail/constants.hpp Source File

Boost.Sort

- Main Page
- Namespaces
- Classes
- Files

- File List

constants.hpp
Go to the documentation of this file.
1 //constant definitions for the Boost Sort library
2
3 // Copyright Steven J. Ross 2001 - 2014
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7
8 // See http://www.boost.org/libs/sort for library home page.
9 #ifndef BOOST_SORT_SPREADSORT_DETAIL_CONSTANTS
10 #define BOOST_SORT_SPREADSORT_DETAIL_CONSTANTS
11 namespace boost {
12 namespace sort {
13 namespace detail {
14 //Tuning constants
15 //This should be tuned to your processor cache;
16 //if you go too large you get cache misses on bins
17 //The smaller this number, the less worst-case memory usage.
18 //If too small, too many recursions slow down spreadsort
19 enum { max_splits = 11,
20 //It's better to have a few cache misses and finish sorting
21 //than to run another iteration
22 max_finishing_splits = max_splits + 1,
23 //Sets the minimum number of items per bin.
24 int_log_mean_bin_size = 2,
25 //Used to force a comparison-based sorting for small bins, if it's faster.
26 //Minimum value 1
27 int_log_min_split_count = 9,
28 //This is the minimum split count to use spreadsort when it will finish in one
29 //iteration. Make this larger the faster std::sort is relative to integer_sort.
30 int_log_finishing_count = 31,
31 //Sets the minimum number of items per bin for floating point.
32 float_log_mean_bin_size = 2,
33 //Used to force a comparison-based sorting for small bins, if it's faster.
34 //Minimum value 1
35 float_log_min_split_count = 8,
36 //This is the minimum split count to use spreadsort when it will finish in one
37 //iteration. Make this larger the faster std::sort is relative to float_sort.
38 float_log_finishing_count = 4,
39 //There is a minimum size below which it is not worth using spreadsort
40 min_sort_size = 1000 };
41 }
42 }
43 }
44 #endif
boost
Definition: constants.hpp:11
boost::sort::detail::float_log_finishing_count
Definition: constants.hpp:38
boost::sort::detail::int_log_finishing_count
Definition: constants.hpp:30
boost::sort::detail::max_finishing_splits
Definition: constants.hpp:22
boost::sort::detail::int_log_min_split_count
Definition: constants.hpp:27
boost::sort::detail::max_splits
Definition: constants.hpp:19
boost::sort::detail::min_sort_size
Definition: constants.hpp:40
boost::sort::detail::int_log_mean_bin_size
Definition: constants.hpp:24
boost::sort::detail::float_log_min_split_count
Definition: constants.hpp:35
boost::sort::detail::float_log_mean_bin_size
Definition: constants.hpp:32