Note: We no longer publish the latest version of our code here. We primarily use a kumc-bmi github organization. The heron ETL repository, in particular, is not public. Peers in the informatics community should see MultiSiteDev for details on requesting access.

source: webrtc/webrtc/system_wrappers/source/spreadsortlib/constants.hpp @ 0:4bda6873e34c

pub_scrub_3792 tip
Last change on this file since 0:4bda6873e34c was 0:4bda6873e34c, checked in by Michael Prittie <mprittie@…>, 6 years ago

Scrubbed password for publication.

File size: 2.2 KB
Line 
1/*Boost Software License - Version 1.0 - August 17th, 2003
2
3Permission is hereby granted, free of charge, to any person or organization
4obtaining a copy of the software and accompanying documentation covered by
5this license (the "Software") to use, reproduce, display, distribute,
6execute, and transmit the Software, and to prepare derivative works of the
7Software, and to permit third-parties to whom the Software is furnished to
8do so, all subject to the following:
9
10The copyright notices in the Software and this entire statement, including
11the above license grant, this restriction and the following disclaimer,
12must be included in all copies of the Software, in whole or in part, and
13all derivative works of the Software, unless such copies or derivative
14works are solely in the form of machine-executable object code generated by
15a source language processor.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
20SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
21FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
22ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23DEALINGS IN THE SOFTWARE.*/
24#ifndef BOOST_SPREADSORT_CONSTANTS
25#define BOOST_SPREADSORT_CONSTANTS
26namespace boost {
27namespace detail {
28//Tuning constants
29//Sets the minimum number of items per bin.
30static const unsigned LOG_MEAN_BIN_SIZE = 2;
31//This should be tuned to your processor cache; if you go too large you get cache misses on bins
32//The smaller this number, the less worst-case memory usage.  If too small, too many recursions slow down spreadsort
33static const unsigned MAX_SPLITS = 10;
34//Used to force a comparison-based sorting for small bins, if it's faster.  Minimum value 0
35static const unsigned LOG_MIN_SPLIT_COUNT = 5;
36//There is a minimum size below which it is not worth using spreadsort
37static const long MIN_SORT_SIZE = 1000;
38//This is the constant on the log base n of m calculation; make this larger the faster std::sort is relative to spreadsort
39static const unsigned LOG_CONST = 2;
40}
41}
42#endif
Note: See TracBrowser for help on using the repository browser.