annotate src/fftw-3.3.5/genfft/magic.ml @ 82:d0c2a83c1364

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