From: Sven Verdoolaege Date: Sun, 13 Feb 2011 08:44:53 +0000 (+0100) Subject: add isl_basic_map_set_rational X-Git-Tag: isl-0.06~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e7ea4bc2e0ee5027a9d097d52b3418d38d172dc;p=platform%2Fupstream%2Fisl.git add isl_basic_map_set_rational Signed-off-by: Sven Verdoolaege --- diff --git a/isl_convex_hull.c b/isl_convex_hull.c index a644201..1a9194a 100644 --- a/isl_convex_hull.c +++ b/isl_convex_hull.c @@ -174,21 +174,28 @@ error: return -1; } -struct isl_basic_set *isl_basic_set_set_rational(struct isl_basic_set *bset) +__isl_give isl_basic_map *isl_basic_map_set_rational( + __isl_take isl_basic_set *bmap) { - if (!bset) + if (!bmap) return NULL; - if (ISL_F_ISSET(bset, ISL_BASIC_MAP_RATIONAL)) - return bset; + if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) + return bmap; - bset = isl_basic_set_cow(bset); - if (!bset) + bmap = isl_basic_map_cow(bmap); + if (!bmap) return NULL; - ISL_F_SET(bset, ISL_BASIC_MAP_RATIONAL); + ISL_F_SET(bmap, ISL_BASIC_MAP_RATIONAL); + + return isl_basic_map_finalize(bmap); +} - return isl_basic_set_finalize(bset); +__isl_give isl_basic_set *isl_basic_set_set_rational( + __isl_take isl_basic_set *bset) +{ + return isl_basic_map_set_rational(bset); } static struct isl_set *isl_set_set_rational(struct isl_set *set) diff --git a/isl_map_private.h b/isl_map_private.h index 8eb4d9f..59bbdcc 100644 --- a/isl_map_private.h +++ b/isl_map_private.h @@ -256,6 +256,8 @@ struct isl_basic_set *isl_basic_set_recession_cone(struct isl_basic_set *bset); struct isl_basic_set *isl_basic_set_lineality_space(struct isl_basic_set *bset); struct isl_basic_set *isl_basic_set_set_rational(struct isl_basic_set *bset); +__isl_give isl_basic_map *isl_basic_map_set_rational( + __isl_take isl_basic_map *bmap); struct isl_mat;