isl_basic_map_from_constraint: only return copy of bmap on equality constraints
[isl.git] / isl_options.c
blob558373f52992e8eafee65ab6e4cd7b2e57a0a023
1 /*
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
8 */
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <string.h>
14 #include "isl_ctx.h"
15 #include "isl_options.h"
16 #include <isl_version.h>
18 struct isl_arg_choice isl_lp_solver_choice[] = {
19 {"tab", ISL_LP_TAB},
20 #ifdef ISL_PIPLIB
21 {"pip", ISL_LP_PIP},
22 #endif
23 {0}
26 struct isl_arg_choice isl_ilp_solver_choice[] = {
27 {"gbr", ISL_ILP_GBR},
28 #ifdef ISL_PIPLIB
29 {"pip", ISL_ILP_PIP},
30 #endif
31 {0}
34 struct isl_arg_choice isl_pip_solver_choice[] = {
35 {"tab", ISL_PIP_TAB},
36 #ifdef ISL_PIPLIB
37 {"pip", ISL_PIP_PIP},
38 #endif
39 {0}
42 struct isl_arg_choice isl_pip_context_choice[] = {
43 {"gbr", ISL_CONTEXT_GBR},
44 {"lexmin", ISL_CONTEXT_LEXMIN},
45 {0}
48 struct isl_arg_choice isl_gbr_choice[] = {
49 {"never", ISL_GBR_NEVER},
50 {"once", ISL_GBR_ONCE},
51 {"always", ISL_GBR_ALWAYS},
52 {0}
55 struct isl_arg_choice isl_closure_choice[] = {
56 {"isl", ISL_CLOSURE_ISL},
57 {"omega", ISL_CLOSURE_OMEGA},
58 {0}
61 static struct isl_arg_choice bound[] = {
62 {"bernstein", ISL_BOUND_BERNSTEIN},
63 {"range", ISL_BOUND_RANGE},
64 {0}
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},
75 {0}
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_VERSION(print_version)
106 ISL_ARG_END
109 ISL_ARG_DEF(isl_options, struct isl_options, isl_options_arg)