add isl_set_from_params
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 22 Sep 2011 10:00:28 +0000 (12:00 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 22 Sep 2011 11:31:31 +0000 (13:31 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/set.h
isl_map.c

index 8fc61bc..8dd6fd3 100644 (file)
@@ -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.
 
index ce816b1..b48a230 100644 (file)
@@ -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);
index 8b18baf..bb1e341 100644 (file)
--- 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)