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 {"box", ISL_CLOSURE_BOX
},
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 struct isl_arg_choice convex
[] = {
79 {"wrap", ISL_CONVEX_HULL_WRAP
},
80 {"fm", ISL_CONVEX_HULL_FM
},
84 static void print_version(void)
86 printf("%s", isl_version());
89 struct isl_arg isl_options_arg
[] = {
90 ISL_ARG_CHOICE(struct isl_options
, lp_solver
, 0, "lp-solver", \
91 isl_lp_solver_choice
, ISL_LP_TAB
, "lp solver to use")
92 ISL_ARG_CHOICE(struct isl_options
, ilp_solver
, 0, "ilp-solver", \
93 isl_ilp_solver_choice
, ISL_ILP_GBR
, "ilp solver to use")
94 ISL_ARG_CHOICE(struct isl_options
, pip
, 0, "pip", \
95 isl_pip_solver_choice
, ISL_PIP_TAB
, "pip solver to use")
96 ISL_ARG_CHOICE(struct isl_options
, context
, 0, "context", \
97 isl_pip_context_choice
, ISL_CONTEXT_GBR
,
98 "how to handle the pip context tableau")
99 ISL_ARG_CHOICE(struct isl_options
, gbr
, 0, "gbr", \
100 isl_gbr_choice
, ISL_GBR_ONCE
,
101 "how often to use generalized basis reduction")
102 ISL_ARG_CHOICE(struct isl_options
, closure
, 0, "closure", \
103 isl_closure_choice
, ISL_CLOSURE_ISL
,
104 "closure operation to use")
105 ISL_ARG_BOOL(struct isl_options
, gbr_only_first
, 0, "gbr-only-first", 0,
106 "only perform basis reduction in first direction")
107 ISL_ARG_CHOICE(struct isl_options
, bound
, 0, "bound", bound
,
108 ISL_BOUND_BERNSTEIN
, "algorithm to use for computing bounds")
109 ISL_ARG_FLAGS(struct isl_options
, bernstein_recurse
, 0,
110 "bernstein-recurse", bernstein_recurse
, ISL_BERNSTEIN_FACTORS
, NULL
)
111 ISL_ARG_BOOL(struct isl_options
, bernstein_triangulate
, 0,
112 "bernstein-triangulate", 1,
113 "triangulate domains during Bernstein expansion")
114 ISL_ARG_BOOL(struct isl_options
, pip_symmetry
, 0, "pip-symmetry", 1,
115 "detect simple symmetries in PIP input")
116 ISL_ARG_CHOICE(struct isl_options
, convex
, 0, "convex-hull", \
117 convex
, ISL_CONVEX_HULL_WRAP
, "convex hull algorithm to use")
118 ISL_ARG_VERSION(print_version
)
122 ISL_ARG_DEF(isl_options
, struct isl_options
, isl_options_arg
)