]> mj.ucw.cz Git - libucw.git/blob - lib/sorter/config.c
A subset of tests can be requested now. Also, the radix sort width
[libucw.git] / lib / sorter / config.c
1 /*
2  *      UCW Library -- Universal Sorter: Configuration
3  *
4  *      (c) 2007 Martin Mares <mj@ucw.cz>
5  *
6  *      This software may be freely distributed and used according to the terms
7  *      of the GNU Lesser General Public License.
8  */
9
10 #include "lib/lib.h"
11 #include "lib/conf.h"
12 #include "lib/fastbuf.h"
13 #include "lib/sorter/common.h"
14
15 uns sorter_trace;
16 uns sorter_stream_bufsize = 65536;
17 u64 sorter_bufsize = 65536;
18 uns sorter_debug;
19 uns sorter_min_radix_bits;
20 uns sorter_max_radix_bits;
21 uns sorter_min_multiway_bits;
22 uns sorter_max_multiway_bits;
23 uns sorter_threads;
24 uns sorter_thread_threshold;
25 struct fb_params sorter_fb_params;
26
27 static struct cf_section sorter_config = {
28   CF_ITEMS {
29     CF_UNS("Trace", &sorter_trace),
30     CF_UNS("StreamBuffer", &sorter_stream_bufsize),
31     CF_SECTION("FileAccess", &sorter_fb_params, &fbpar_cf),
32     CF_U64("SortBuffer", &sorter_bufsize),
33     CF_UNS("Debug", &sorter_debug),
34     CF_UNS("MinRadixBits", &sorter_min_radix_bits),
35     CF_UNS("MaxRadixBits", &sorter_max_radix_bits),
36     CF_UNS("MinMultiwayBits", &sorter_min_multiway_bits),
37     CF_UNS("MaxMultiwayBits", &sorter_max_multiway_bits),
38     CF_UNS("Threads", &sorter_threads),
39     CF_UNS("ThreadThreshold", &sorter_thread_threshold),
40     CF_END
41   }
42 };
43
44 static void CONSTRUCTOR sorter_init_config(void)
45 {
46   cf_declare_section("Sorter", &sorter_config, 0);
47 }