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 "lib/fastbuf.h"
13 #include "lib/sorter/common.h"
16 uns sorter_trace_array;
17 u64 sorter_bufsize = 65536;
19 uns sorter_min_radix_bits;
20 uns sorter_max_radix_bits;
21 uns sorter_add_radix_bits;
22 uns sorter_min_multiway_bits;
23 uns 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_UNS("Trace", &sorter_trace),
35 CF_UNS("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_UNS("Debug", &sorter_debug),
41 CF_UNS("MinRadixBits", &sorter_min_radix_bits),
42 CF_UNS("MaxRadixBits", &sorter_max_radix_bits),
43 CF_UNS("AddRadixBits", &sorter_add_radix_bits),
44 CF_UNS("MinMultiwayBits", &sorter_min_multiway_bits),
45 CF_UNS("MaxMultiwayBits", &sorter_max_multiway_bits),
46 CF_UNS("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);