From 38ea280a9d06a71d038976fa61766dd46002771d Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 12 Oct 2010 11:18:27 +0200 Subject: [PATCH] add isl_set_flatten Signed-off-by: Sven Verdoolaege --- doc/user.pod | 11 +++++++++++ include/isl_map.h | 1 + isl_map.c | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index 33860108..b81b3167 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -1334,6 +1334,17 @@ the overapproximation), then you will get an error message. __isl_give isl_union_map *isl_union_set_unwrap( __isl_take isl_union_set *uset); +=item * Flattening + +Remove any internal structure of domain (and range) of the given +set or relation. If there is any such internal structure in the input, +then the name of the space is also removed. + + __isl_give isl_set *isl_set_flatten( + __isl_take isl_set *set); + __isl_give isl_map *isl_map_flatten( + __isl_take isl_map *map); + =item * Dimension manipulation __isl_give isl_set *isl_set_add_dims( diff --git a/include/isl_map.h b/include/isl_map.h index 88f57703..de18c872 100644 --- a/include/isl_map.h +++ b/include/isl_map.h @@ -380,6 +380,7 @@ __isl_give isl_set *isl_map_wrap(__isl_take isl_map *map); __isl_give isl_basic_map *isl_basic_set_unwrap(__isl_take isl_basic_set *bset); __isl_give isl_map *isl_set_unwrap(__isl_take isl_set *set); __isl_give isl_map *isl_map_flatten(__isl_take isl_map *map); +__isl_give isl_set *isl_set_flatten(__isl_take isl_set *set); __isl_give isl_set *isl_map_domain(__isl_take isl_map *bmap); __isl_give isl_set *isl_map_range(__isl_take isl_map *map); __isl_give isl_map *isl_map_domain_map(__isl_take isl_map *map); diff --git a/isl_map.c b/isl_map.c index 82af8883..e1b7c05e 100644 --- a/isl_map.c +++ b/isl_map.c @@ -7576,6 +7576,11 @@ error: return NULL; } +__isl_give isl_set *isl_set_flatten(__isl_take isl_set *set) +{ + return (isl_set *)isl_map_flatten((isl_map *)set); +} + /* Extend the given dim_map with mappings for the divs in bmap. */ static __isl_give struct isl_dim_map *extend_dim_map( -- 2.11.4.GIT