X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=bound.c;h=a0772b7b98e87a756ad32f200b631f3cc7369885;hb=de51a9bc4da5dd3f1f9f57c2362da6f9752c44e0;hp=f83e0253641ad81efdcee2cf04b5977491708faf;hpb=b7d848b49611b6bed2bfb1c7ab329beb54eca31d;p=platform%2Fupstream%2Fisl.git diff --git a/bound.c b/bound.c index f83e025..a0772b7 100644 --- a/bound.c +++ b/bound.c @@ -2,6 +2,7 @@ #include #include #include +#include struct bound_options { struct isl_options *isl; @@ -10,15 +11,15 @@ struct bound_options { int continue_on_error; }; -struct isl_arg bound_options_arg[] = { -ISL_ARG_CHILD(struct bound_options, isl, "isl", isl_options_arg, "isl options") +ISL_ARGS_START(struct bound_options, bound_options_args) +ISL_ARG_CHILD(struct bound_options, isl, "isl", &isl_options_args, + "isl options") ISL_ARG_BOOL(struct bound_options, verify, 'T', "verify", 0, NULL) ISL_ARG_BOOL(struct bound_options, print_all, 'A', "print-all", 0, NULL) ISL_ARG_BOOL(struct bound_options, continue_on_error, '\0', "continue-on-error", 0, NULL) -ISL_ARG_END -}; +ISL_ARGS_END -ISL_ARG_DEF(bound_options, struct bound_options, bound_options_arg) +ISL_ARG_DEF(bound_options, struct bound_options, bound_options_args) static __isl_give isl_set *set_bounds(__isl_take isl_set *set) { @@ -111,7 +112,7 @@ static int verify_point(__isl_take isl_point *pnt, void *user) opt = isl_pw_qpolynomial_fold_min(isl_pw_qpolynomial_fold_copy(pwf)); nvar = isl_set_dim(dom, isl_dim_set); - opt = isl_qpolynomial_drop_dims(opt, isl_dim_set, 0, nvar); + opt = isl_qpolynomial_project_domain_on_params(opt); if (vpb->exact && bounded) ok = isl_qpolynomial_plain_is_equal(opt, bound); else if (sign > 0) @@ -175,8 +176,7 @@ static int check_solution(__isl_take isl_pw_qpolynomial_fold *pwf, int i, r, n; dom = isl_pw_qpolynomial_fold_domain(isl_pw_qpolynomial_fold_copy(pwf)); - context = isl_set_remove_dims(isl_set_copy(dom), isl_dim_set, - 0, isl_set_dim(dom, isl_dim_set)); + context = isl_set_params(isl_set_copy(dom)); context = isl_set_remove_divs(context); context = set_bounds(context); @@ -239,7 +239,7 @@ int main(int argc, char **argv) assert(options); argc = bound_options_parse(options, argc, argv, ISL_ARG_ALL); - ctx = isl_ctx_alloc_with_options(bound_options_arg, options); + ctx = isl_ctx_alloc_with_options(&bound_options_args, options); s = isl_stream_new_file(ctx, stdin); obj = isl_stream_read_obj(s);