From: Sven Verdoolaege Date: Mon, 9 Apr 2012 15:05:00 +0000 (+0200) Subject: add isl_union_set_from_basic_set and isl_union_map_from_basic_map X-Git-Tag: isl-0.11~251 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4888143907707145bcb1fcfe8688332a6bf1fa54;p=platform%2Fupstream%2Fisl.git add isl_union_set_from_basic_set and isl_union_map_from_basic_map Signed-off-by: Sven Verdoolaege --- diff --git a/doc/user.pod b/doc/user.pod index 20f890b..6a736c1 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -1186,10 +1186,14 @@ using the following functions. Sets and relations can be converted to union sets and relations using the following functions. - __isl_give isl_union_map *isl_union_map_from_map( - __isl_take isl_map *map); + __isl_give isl_union_set *isl_union_set_from_basic_set( + __isl_take isl_basic_set *bset); + __isl_give isl_union_map *isl_union_map_from_basic_map( + __isl_take isl_basic_map *bmap); __isl_give isl_union_set *isl_union_set_from_set( __isl_take isl_set *set); + __isl_give isl_union_map *isl_union_map_from_map( + __isl_take isl_map *map); The inverse conversions below can only be used if the input union set or relation is known to contain elements in exactly one diff --git a/include/isl/union_map.h b/include/isl/union_map.h index 9817ab5..e34d1fb 100644 --- a/include/isl/union_map.h +++ b/include/isl/union_map.h @@ -11,6 +11,9 @@ extern "C" { #endif __isl_constructor +__isl_give isl_union_map *isl_union_map_from_basic_map( + __isl_take isl_basic_map *bmap); +__isl_constructor __isl_give isl_union_map *isl_union_map_from_map(__isl_take isl_map *map); __isl_give isl_union_map *isl_union_map_empty(__isl_take isl_space *dim); __isl_give isl_union_map *isl_union_map_copy(__isl_keep isl_union_map *umap); diff --git a/include/isl/union_set.h b/include/isl/union_set.h index c2acec4..be85977 100644 --- a/include/isl/union_set.h +++ b/include/isl/union_set.h @@ -9,6 +9,9 @@ extern "C" { #endif __isl_constructor +__isl_give isl_union_set *isl_union_set_from_basic_set( + __isl_take isl_basic_set *bset); +__isl_constructor __isl_give isl_union_set *isl_union_set_from_set(__isl_take isl_set *set); __isl_give isl_union_set *isl_union_set_empty(__isl_take isl_space *dim); __isl_give isl_union_set *isl_union_set_copy(__isl_keep isl_union_set *uset); diff --git a/isl_union_map.c b/isl_union_map.c index 646ac87..ee6b157 100644 --- a/isl_union_map.c +++ b/isl_union_map.c @@ -347,6 +347,18 @@ __isl_give isl_union_set *isl_union_set_from_set(__isl_take isl_set *set) return isl_union_map_from_map((isl_map *)set); } +__isl_give isl_union_map *isl_union_map_from_basic_map( + __isl_take isl_basic_map *bmap) +{ + return isl_union_map_from_map(isl_map_from_basic_map(bmap)); +} + +__isl_give isl_union_set *isl_union_set_from_basic_set( + __isl_take isl_basic_set *bset) +{ + return isl_union_map_from_basic_map(bset); +} + struct isl_union_map_foreach_data { int (*fn)(__isl_take isl_map *map, void *user);