2 * UCW Library -- Universal Sorter: Configuration
4 * (c) 2007 Martin Mares <mj@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU Lesser General Public License.
12 #include <ucw/fastbuf.h>
13 #include <ucw/sorter/common.h>
16 uint sorter_trace_array;
17 u64 sorter_bufsize = 65536;
19 uint sorter_min_radix_bits;
20 uint sorter_max_radix_bits;
21 uint sorter_add_radix_bits;
22 uint sorter_min_multiway_bits;
23 uint sorter_max_multiway_bits;
25 u64 sorter_thread_threshold = 1048576;
26 u64 sorter_thread_chunk = 4096;
27 u64 sorter_radix_threshold = 4096;
28 struct fb_params sorter_fb_params;
29 struct fb_params sorter_small_fb_params;
30 u64 sorter_small_input;
32 static struct cf_section sorter_config = {
34 CF_UINT("Trace", &sorter_trace),
35 CF_UINT("TraceArray", &sorter_trace_array),
36 CF_SECTION("FileAccess", &sorter_fb_params, &fbpar_cf),
37 CF_SECTION("SmallFileAccess", &sorter_fb_params, &fbpar_cf),
38 CF_U64("SmallInput", &sorter_small_input),
39 CF_U64("SortBuffer", &sorter_bufsize),
40 CF_UINT("Debug", &sorter_debug),
41 CF_UINT("MinRadixBits", &sorter_min_radix_bits),
42 CF_UINT("MaxRadixBits", &sorter_max_radix_bits),
43 CF_UINT("AddRadixBits", &sorter_add_radix_bits),
44 CF_UINT("MinMultiwayBits", &sorter_min_multiway_bits),
45 CF_UINT("MaxMultiwayBits", &sorter_max_multiway_bits),
46 CF_UINT("Threads", &sorter_threads),
47 CF_U64("ThreadThreshold", &sorter_thread_threshold),
48 CF_U64("ThreadChunk", &sorter_thread_chunk),
49 CF_U64("RadixThreshold", &sorter_radix_threshold),
54 static void CONSTRUCTOR sorter_init_config(void)
56 cf_declare_section("Sorter", &sorter_config, 0);