comparison src/fftw-3.3.3/genfft/magic.ml @ 10:37bf6b4a2645

Add FFTW3
author Chris Cannam
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
comparison
equal deleted inserted replaced
9:c0fb53affa76 10:37bf6b4a2645
1 (*
2 * Copyright (c) 1997-1999 Massachusetts Institute of Technology
3 * Copyright (c) 2003, 2007-11 Matteo Frigo
4 * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 *)
21
22 (* magic parameters *)
23 let verbose = ref false
24 let vneg = ref false
25 let karatsuba_min = ref 15
26 let karatsuba_variant = ref 2
27 let circular_min = ref 64
28 let rader_min = ref 13
29 let rader_list = ref [5]
30 let alternate_convolution = ref 17
31 let threemult = ref false
32 let inline_single = ref true
33 let inline_loads = ref false
34 let inline_loads_constants = ref false
35 let inline_constants = ref true
36 let trivial_stores = ref false
37 let locations_are_special = ref false
38 let strength_reduce_mul = ref false
39 let number_of_variables = ref 4
40 let codelet_name = ref "unnamed"
41 let randomized_cse = ref true
42 let dif_split_radix = ref false
43 let enable_fma = ref false
44 let deep_collect_depth = ref 1
45 let schedule_type = ref 0
46 let compact = ref false
47 let dag_dump_file = ref ""
48 let alist_dump_file = ref ""
49 let asched_dump_file = ref ""
50 let lisp_syntax = ref false
51 let network_transposition = ref true
52 let inklude = ref ""
53 let generic_arith = ref false
54 let reorder_insns = ref false
55 let reorder_loads = ref false
56 let reorder_stores = ref false
57 let precompute_twiddles = ref false
58 let newsplit = ref false
59 let standalone = ref false
60 let pipeline_latency = ref 0
61 let schedule_for_pipeline = ref false
62 let generate_bytw = ref true
63
64 (* command-line parser for magic parameters *)
65 let undocumented = " Undocumented voodoo parameter"
66
67 let set_bool var = Arg.Unit (fun () -> var := true)
68 let unset_bool var = Arg.Unit (fun () -> var := false)
69 let set_int var = Arg.Int(fun i -> var := i)
70 let set_string var = Arg.String(fun s -> var := s)
71
72 let speclist = [
73 "-name", set_string codelet_name, " set codelet name";
74 "-standalone", set_bool standalone, " standalone codelet (no desc)";
75 "-include", set_string inklude, undocumented;
76
77 "-verbose", set_bool verbose, " Enable verbose logging messages to stderr";
78
79 "-rader-min", set_int rader_min,
80 "<n> : Use Rader's algorithm for prime sizes >= <n>";
81
82 "-threemult", set_bool threemult,
83 " Use 3-multiply complex multiplications";
84
85 "-karatsuba-min", set_int karatsuba_min, undocumented;
86 "-karatsuba-variant", set_int karatsuba_variant, undocumented;
87 "-circular-min", set_int circular_min, undocumented;
88
89 "-compact", set_bool compact,
90 " Mangle variable names to reduce size of source code";
91 "-no-compact", unset_bool compact,
92 " Disable -compact";
93
94 "-dump-dag", set_string dag_dump_file, undocumented;
95 "-dump-alist", set_string alist_dump_file, undocumented;
96 "-dump-asched", set_string asched_dump_file, undocumented;
97 "-lisp-syntax", set_bool lisp_syntax, undocumented;
98
99 "-alternate-convolution", set_int alternate_convolution, undocumented;
100 "-deep-collect-depth", set_int deep_collect_depth, undocumented;
101 "-schedule-type", set_int schedule_type, undocumented;
102 "-pipeline-latency", set_int pipeline_latency, undocumented;
103 "-schedule-for-pipeline", set_bool schedule_for_pipeline, undocumented;
104
105 "-dif-split-radix", set_bool dif_split_radix, undocumented;
106 "-dit-split-radix", unset_bool dif_split_radix, undocumented;
107
108 "-generic-arith", set_bool generic_arith, undocumented;
109 "-no-generic-arith", unset_bool generic_arith, undocumented;
110
111 "-precompute-twiddles", set_bool precompute_twiddles, undocumented;
112 "-no-precompute-twiddles", unset_bool precompute_twiddles, undocumented;
113
114 "-inline-single", set_bool inline_single, undocumented;
115 "-no-inline-single", unset_bool inline_single, undocumented;
116
117 "-inline-loads", set_bool inline_loads, undocumented;
118 "-no-inline-loads", unset_bool inline_loads, undocumented;
119
120 "-inline-loads-constants", set_bool inline_loads_constants, undocumented;
121 "-no-inline-loads-constants",
122 unset_bool inline_loads_constants, undocumented;
123
124 "-inline-constants", set_bool inline_constants, undocumented;
125 "-no-inline-constants", unset_bool inline_constants, undocumented;
126
127 "-trivial-stores", set_bool trivial_stores, undocumented;
128 "-no-trivial-stores", unset_bool trivial_stores, undocumented;
129
130 "-locations-are-special", set_bool locations_are_special, undocumented;
131 "-no-locations-are-special", unset_bool locations_are_special, undocumented;
132
133 "-randomized-cse", set_bool randomized_cse, undocumented;
134 "-no-randomized-cse", unset_bool randomized_cse, undocumented;
135
136 "-network-transposition", set_bool network_transposition, undocumented;
137 "-no-network-transposition", unset_bool network_transposition, undocumented;
138
139 "-reorder-insns", set_bool reorder_insns, undocumented;
140 "-no-reorder-insns", unset_bool reorder_insns, undocumented;
141 "-reorder-loads", set_bool reorder_loads, undocumented;
142 "-no-reorder-loads", unset_bool reorder_loads, undocumented;
143 "-reorder-stores", set_bool reorder_stores, undocumented;
144 "-no-reorder-stores", unset_bool reorder_stores, undocumented;
145
146 "-newsplit", set_bool newsplit, undocumented;
147
148 "-vneg", set_bool vneg, undocumented;
149 "-fma", set_bool enable_fma, undocumented;
150 "-no-fma", unset_bool enable_fma, undocumented;
151
152 "-variables", set_int number_of_variables, undocumented;
153
154 "-strength-reduce-mul", set_bool strength_reduce_mul, undocumented;
155 "-no-strength-reduce-mul", unset_bool strength_reduce_mul, undocumented;
156
157 "-generate-bytw", set_bool generate_bytw, undocumented;
158 "-no-generate-bytw", unset_bool generate_bytw, undocumented;
159 ]
160
161