X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=isl_options.c;h=d382af731352c1fa89517cd0726e98799041afec;hb=e2cbb6c20e8bb3847d96fb485336ac6b763ec02e;hp=dfebd3e2707501c965d269e77547108ec0249b5e;hpb=309036cf4fb6d77a3287a8de8a9098c0a1211778;p=platform%2Fupstream%2Fisl.git diff --git a/isl_options.c b/isl_options.c index dfebd3e..d382af7 100644 --- a/isl_options.c +++ b/isl_options.c @@ -11,8 +11,9 @@ #include #include -#include "isl_ctx.h" -#include "isl_options.h" +#include +#include +#include struct isl_arg_choice isl_lp_solver_choice[] = { {"tab", ISL_LP_TAB}, @@ -51,18 +52,72 @@ struct isl_arg_choice isl_gbr_choice[] = { {0} }; +struct isl_arg_choice isl_closure_choice[] = { + {"isl", ISL_CLOSURE_ISL}, + {"box", ISL_CLOSURE_BOX}, + {0} +}; + +static struct isl_arg_choice bound[] = { + {"bernstein", ISL_BOUND_BERNSTEIN}, + {"range", ISL_BOUND_RANGE}, + {0} +}; + +static struct isl_arg_flags bernstein_recurse[] = { + {"none", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, 0}, + {"factors", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, + ISL_BERNSTEIN_FACTORS}, + {"intervals", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, + ISL_BERNSTEIN_INTERVALS}, + {"full", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, + ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS}, + {0} +}; + +static struct isl_arg_choice convex[] = { + {"wrap", ISL_CONVEX_HULL_WRAP}, + {"fm", ISL_CONVEX_HULL_FM}, + {0} +}; + +static void print_version(void) +{ + printf("%s", isl_version()); +} + struct isl_arg isl_options_arg[] = { ISL_ARG_CHOICE(struct isl_options, lp_solver, 0, "lp-solver", \ - isl_lp_solver_choice, ISL_LP_TAB) + isl_lp_solver_choice, ISL_LP_TAB, "lp solver to use") ISL_ARG_CHOICE(struct isl_options, ilp_solver, 0, "ilp-solver", \ - isl_ilp_solver_choice, ISL_ILP_GBR) + isl_ilp_solver_choice, ISL_ILP_GBR, "ilp solver to use") ISL_ARG_CHOICE(struct isl_options, pip, 0, "pip", \ - isl_pip_solver_choice, ISL_PIP_TAB) + isl_pip_solver_choice, ISL_PIP_TAB, "pip solver to use") ISL_ARG_CHOICE(struct isl_options, context, 0, "context", \ - isl_pip_context_choice, ISL_CONTEXT_GBR) + isl_pip_context_choice, ISL_CONTEXT_GBR, + "how to handle the pip context tableau") ISL_ARG_CHOICE(struct isl_options, gbr, 0, "gbr", \ - isl_gbr_choice, ISL_GBR_ONCE) -ISL_ARG_BOOL(struct isl_options, gbr_only_first, 0, "gbr-only-first", 0) + isl_gbr_choice, ISL_GBR_ONCE, + "how often to use generalized basis reduction") +ISL_ARG_CHOICE(struct isl_options, closure, 0, "closure", \ + isl_closure_choice, ISL_CLOSURE_ISL, + "closure operation to use") +ISL_ARG_BOOL(struct isl_options, gbr_only_first, 0, "gbr-only-first", 0, + "only perform basis reduction in first direction") +ISL_ARG_CHOICE(struct isl_options, bound, 0, "bound", bound, + ISL_BOUND_BERNSTEIN, "algorithm to use for computing bounds") +ISL_ARG_FLAGS(struct isl_options, bernstein_recurse, 0, + "bernstein-recurse", bernstein_recurse, ISL_BERNSTEIN_FACTORS, NULL) +ISL_ARG_BOOL(struct isl_options, bernstein_triangulate, 0, + "bernstein-triangulate", 1, + "triangulate domains during Bernstein expansion") +ISL_ARG_BOOL(struct isl_options, pip_symmetry, 0, "pip-symmetry", 1, + "detect simple symmetries in PIP input") +ISL_ARG_CHOICE(struct isl_options, convex, 0, "convex-hull", \ + convex, ISL_CONVEX_HULL_WRAP, "convex hull algorithm to use") +ISL_ARG_BOOL(struct isl_options, schedule_parametric, 0, + "schedule-parametric", 1, "construct possibly parametric schedules") +ISL_ARG_VERSION(print_version) ISL_ARG_END };