isl_basic_set_project_out: handle rational sets
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 18 Oct 2009 16:00:05 +0000 (18:00 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 21 Oct 2009 20:58:47 +0000 (22:58 +0200)
For rational sets, projection boils down to (Fourier-Motzkin)
elimination, so just call isl_basic_set_remove.

isl_map.c

index ec3962e..44963b7 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -1892,6 +1892,9 @@ struct isl_basic_set *isl_basic_set_project_out(struct isl_basic_set *bset,
        if (n == 0)
                return bset;
 
+       if (ISL_F_ISSET(bset, ISL_BASIC_SET_RATIONAL))
+               return isl_basic_set_remove(bset, type, first, n);
+
        bset = isl_basic_set_cow(bset);
 
        row_size = 1 + isl_dim_total(bset->dim) + bset->extra;