From 85b7bb84a5e9a0706d929837fdf3e6045bb367bb Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 22 Sep 2011 12:00:28 +0200 Subject: [PATCH] add isl_set_from_params Signed-off-by: Sven Verdoolaege --- doc/user.pod | 6 ++++++ include/isl/set.h | 1 + isl_map.c | 11 +++++++++++ 3 files changed, 18 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index 8fc61bc..8dd6fd3 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -1069,6 +1069,12 @@ space. __isl_give isl_map *isl_map_from_union_map( __isl_take isl_union_map *umap); +A zero-dimensional set can be constructed on a given parameter domain +using the following function. + + __isl_give isl_set *isl_set_from_params( + __isl_take isl_set *set); + Sets and relations can be copied and freed again using the following functions. diff --git a/include/isl/set.h b/include/isl/set.h index ce816b1..b48a230 100644 --- a/include/isl/set.h +++ b/include/isl/set.h @@ -191,6 +191,7 @@ int isl_set_follows_at(__isl_keep isl_set *set1, __isl_give isl_basic_set *isl_basic_set_params(__isl_take isl_basic_set *bset); __isl_give isl_set *isl_set_params(__isl_take isl_set *set); +__isl_give isl_set *isl_set_from_params(__isl_take isl_set *set); int isl_basic_set_dims_get_sign(__isl_keep isl_basic_set *bset, enum isl_dim_type type, unsigned pos, unsigned n, int *signs); diff --git a/isl_map.c b/isl_map.c index 8b18baf..bb1e341 100644 --- a/isl_map.c +++ b/isl_map.c @@ -4111,6 +4111,17 @@ __isl_give isl_set *isl_set_params(__isl_take isl_set *set) return set; } +/* Construct a zero-dimensional set with the given parameter domain. + */ +__isl_give isl_set *isl_set_from_params(__isl_take isl_set *set) +{ + isl_space *space; + space = isl_set_get_space(set); + space = isl_space_set_from_params(space); + set = isl_set_reset_space(set, space); + return set; +} + /* Compute the parameter domain of the given map. */ __isl_give isl_set *isl_map_params(__isl_take isl_map *map) -- 2.7.4