add isl_basic_set_remove_dims
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 22 Sep 2008 14:52:04 +0000 (16:52 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 12 Oct 2008 10:11:32 +0000 (12:11 +0200)
include/isl_set.h
isl_map.c

index ea15558..920640a 100644 (file)
@@ -129,6 +129,8 @@ struct isl_set *isl_set_subtract(struct isl_set *set1, struct isl_set *set2);
 struct isl_set *isl_set_apply(struct isl_set *set, struct isl_map *map);
 struct isl_set *isl_set_fix_dim_si(struct isl_set *set,
                unsigned dim, int value);
+struct isl_basic_set *isl_basic_set_remove_dims(struct isl_basic_set *bset,
+               unsigned first, unsigned n);
 struct isl_set *isl_set_remove_dims(struct isl_set *set,
                unsigned first, unsigned n);
 
index 7652207..666cb10 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -1249,6 +1249,15 @@ error:
        return NULL;
 }
 
+/* Project out n dimensions starting at first using Fourier-Motzkin */
+struct isl_basic_set *isl_basic_set_remove_dims(struct isl_basic_set *bset,
+       unsigned first, unsigned n)
+{
+       bset = isl_basic_set_eliminate_vars(bset, bset->nparam + first, n);
+       bset = isl_basic_set_drop_dims(bset, first, n);
+       return bset;
+}
+
 /* Elimininate divs based on inequalities
  */
 static struct isl_basic_map *eliminate_divs_ineq(