From 45c49914c4d4c5726d477aca4bfb367562586eda Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 18 Dec 2009 21:26:31 +0100 Subject: [PATCH] isl_convex_hull.c: is_independent_bound: normalize bounds --- isl_convex_hull.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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]; -- 2.7.4