From a98c03e51e4abfd7551ba367f28465869f334c30 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 2 Mar 2009 23:20:19 +0100 Subject: [PATCH] isl_map_convex_hull: normalize map first --- isl_convex_hull.c | 14 ++------------ isl_map_private.h | 2 ++ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/isl_convex_hull.c b/isl_convex_hull.c index 7fa1e38..780c1a0 100644 --- a/isl_convex_hull.c +++ b/isl_convex_hull.c @@ -1040,12 +1040,7 @@ static struct isl_basic_set *uset_convex_hull(struct isl_set *set) if (!set) goto error; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_convex_hull(set->p[i]); - if (!set->p[i]) - goto error; - } - set = isl_set_remove_empty_parts(set); + set = isl_set_normalize(set); if (!set) return NULL; if (set->n == 1) { @@ -1091,12 +1086,7 @@ static struct isl_basic_set *uset_convex_hull_wrap(struct isl_set *set) if (!set) goto error; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_convex_hull(set->p[i]); - if (!set->p[i]) - goto error; - } - set = isl_set_remove_empty_parts(set); + set = isl_set_normalize(set); if (!set) goto error; if (set->n == 1) { diff --git a/isl_map_private.h b/isl_map_private.h index 1784882..1c4f68b 100644 --- a/isl_map_private.h +++ b/isl_map_private.h @@ -81,6 +81,8 @@ struct isl_map *isl_map_drop(struct isl_map *map, struct isl_map *isl_map_remove_empty_parts(struct isl_map *map); struct isl_set *isl_set_remove_empty_parts(struct isl_set *set); +struct isl_set *isl_set_normalize(struct isl_set *set); + struct isl_set *isl_set_drop_vars( struct isl_set *set, unsigned first, unsigned n); -- 2.7.4