From: Sven Verdoolaege Date: Fri, 18 Dec 2009 20:26:31 +0000 (+0100) Subject: isl_convex_hull.c: is_independent_bound: normalize bounds X-Git-Tag: isl-0.02~175 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=45c49914c4d4c5726d477aca4bfb367562586eda;p=platform%2Fupstream%2Fisl.git isl_convex_hull.c: is_independent_bound: normalize bounds --- diff --git a/isl_convex_hull.c b/isl_convex_hull.c index 297ae19..72dcbc9 100644 --- a/isl_convex_hull.c +++ b/isl_convex_hull.c @@ -155,10 +155,11 @@ static int uset_is_bound(struct isl_set *set, isl_int *c, unsigned len) goto error; continue; } - if (!isl_int_is_one(opt_denom)) - isl_seq_scale(c, c, opt_denom, len); - if (first || isl_int_is_neg(opt)) + if (first || isl_int_is_neg(opt)) { + if (!isl_int_is_one(opt_denom)) + isl_seq_scale(c, c, opt_denom, len); isl_int_sub(c[0], c[0], opt); + } first = 0; } isl_int_clear(opt); @@ -206,6 +207,7 @@ static int is_independent_bound(struct isl_set *set, isl_int *c, is_bound = uset_is_bound(set, dirs->row[n], dirs->n_col); if (is_bound != 1) return is_bound; + isl_seq_normalize(set->ctx, dirs->row[n], dirs->n_col); if (i < n) { int k; isl_int *t = dirs->row[n];