2 * Copyright 2008-2009 Katholieke Universiteit Leuven
4 * Use of this software is governed by the GNU LGPLv2.1 license
6 * Written by Sven Verdoolaege, K.U.Leuven, Departement
7 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
15 #include <isl/options.h>
16 #include <isl/version.h>
18 struct isl_arg_choice isl_lp_solver_choice
[] = {
26 struct isl_arg_choice isl_ilp_solver_choice
[] = {
34 struct isl_arg_choice isl_pip_solver_choice
[] = {
42 struct isl_arg_choice isl_pip_context_choice
[] = {
43 {"gbr", ISL_CONTEXT_GBR
},
44 {"lexmin", ISL_CONTEXT_LEXMIN
},
48 struct isl_arg_choice isl_gbr_choice
[] = {
49 {"never", ISL_GBR_NEVER
},
50 {"once", ISL_GBR_ONCE
},
51 {"always", ISL_GBR_ALWAYS
},
55 struct isl_arg_choice isl_closure_choice
[] = {
56 {"isl", ISL_CLOSURE_ISL
},
57 {"omega", ISL_CLOSURE_OMEGA
},
61 static struct isl_arg_choice bound
[] = {
62 {"bernstein", ISL_BOUND_BERNSTEIN
},
63 {"range", ISL_BOUND_RANGE
},
67 static struct isl_arg_flags bernstein_recurse
[] = {
68 {"none", ISL_BERNSTEIN_FACTORS
| ISL_BERNSTEIN_INTERVALS
, 0},
69 {"factors", ISL_BERNSTEIN_FACTORS
| ISL_BERNSTEIN_INTERVALS
,
70 ISL_BERNSTEIN_FACTORS
},
71 {"intervals", ISL_BERNSTEIN_FACTORS
| ISL_BERNSTEIN_INTERVALS
,
72 ISL_BERNSTEIN_INTERVALS
},
73 {"full", ISL_BERNSTEIN_FACTORS
| ISL_BERNSTEIN_INTERVALS
,
74 ISL_BERNSTEIN_FACTORS
| ISL_BERNSTEIN_INTERVALS
},
78 static void print_version(void)
80 printf("%s", isl_version());
83 struct isl_arg isl_options_arg
[] = {
84 ISL_ARG_CHOICE(struct isl_options
, lp_solver
, 0, "lp-solver", \
85 isl_lp_solver_choice
, ISL_LP_TAB
, "lp solver to use")
86 ISL_ARG_CHOICE(struct isl_options
, ilp_solver
, 0, "ilp-solver", \
87 isl_ilp_solver_choice
, ISL_ILP_GBR
, "ilp solver to use")
88 ISL_ARG_CHOICE(struct isl_options
, pip
, 0, "pip", \
89 isl_pip_solver_choice
, ISL_PIP_TAB
, "pip solver to use")
90 ISL_ARG_CHOICE(struct isl_options
, context
, 0, "context", \
91 isl_pip_context_choice
, ISL_CONTEXT_GBR
,
92 "how to handle the pip context tableau")
93 ISL_ARG_CHOICE(struct isl_options
, gbr
, 0, "gbr", \
94 isl_gbr_choice
, ISL_GBR_ONCE
,
95 "how often to use generalized basis reduction")
96 ISL_ARG_CHOICE(struct isl_options
, closure
, 0, "closure", \
97 isl_closure_choice
, ISL_CLOSURE_ISL
,
98 "closure operation to use")
99 ISL_ARG_BOOL(struct isl_options
, gbr_only_first
, 0, "gbr-only-first", 0,
100 "only perform basis reduction in first direction")
101 ISL_ARG_CHOICE(struct isl_options
, bound
, 0, "bound", bound
,
102 ISL_BOUND_BERNSTEIN
, "algorithm to use for computing bounds")
103 ISL_ARG_FLAGS(struct isl_options
, bernstein_recurse
, 0,
104 "bernstein-recurse", bernstein_recurse
, ISL_BERNSTEIN_FACTORS
, NULL
)
105 ISL_ARG_BOOL(struct isl_options
, bernstein_triangulate
, 0,
106 "bernstein-triangulate", 1,
107 "triangulate domains during Bernstein expansion")
108 ISL_ARG_BOOL(struct isl_options
, pip_symmetry
, 0, "pip-symmetry", 1,
109 "detect simple symmetries in PIP input")
110 ISL_ARG_VERSION(print_version
)
114 ISL_ARG_DEF(isl_options
, struct isl_options
, isl_options_arg
)