bound.c: verify_point: make sure spaces of compared qpolynomials are the same
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 23 Jun 2011 06:50:45 +0000 (08:50 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 23 Jun 2011 06:50:45 +0000 (08:50 +0200)
The current isl_qpolynomial_is_equal doesn't care about the space
in which a qpolynomial lives and so we were allowed to be sloppy before.
Unfortunately, the current isl_qpolynomial_is_equal also completely
ignores the definitions of the integer divisions, so it will have to
be fixed.  This means we can't be sloppy anymore.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
bound.c

diff --git a/bound.c b/bound.c
index 5b50fa2..2a1655c 100644 (file)
--- a/bound.c
+++ b/bound.c
@@ -57,6 +57,7 @@ struct verify_point_bound {
 static int verify_point(__isl_take isl_point *pnt, void *user)
 {
        int i;
+       unsigned nvar;
        unsigned nparam;
        struct verify_point_bound *vpb = (struct verify_point_bound *) user;
        isl_int t;
@@ -110,6 +111,8 @@ static int verify_point(__isl_take isl_point *pnt, void *user)
        else
                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);
        if (vpb->exact && bounded)
                ok = isl_qpolynomial_is_equal(opt, bound);
        else if (sign > 0)