add isl_union_set_apply_union_pw_qpolynomial_fold
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 15 Jan 2011 09:57:36 +0000 (10:57 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 16 Jan 2011 14:04:54 +0000 (15:04 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/polynomial.h
isl_fold.c

index fb22258..a74a1b2 100644 (file)
@@ -2279,22 +2279,35 @@ In future, the operation will also exploit the context
 to simplify the quasipolynomial reductions associated to each cell.
 
        __isl_give isl_pw_qpolynomial_fold *
+       isl_set_apply_pw_qpolynomial_fold(
+               __isl_take isl_set *set,
+               __isl_take isl_pw_qpolynomial_fold *pwf,
+               int *tight);
+       __isl_give isl_pw_qpolynomial_fold *
        isl_map_apply_pw_qpolynomial_fold(
                __isl_take isl_map *map,
                __isl_take isl_pw_qpolynomial_fold *pwf,
                int *tight);
        __isl_give isl_union_pw_qpolynomial_fold *
+       isl_union_set_apply_union_pw_qpolynomial_fold(
+               __isl_take isl_union_set *uset,
+               __isl_take isl_union_pw_qpolynomial_fold *upwf,
+               int *tight);
+       __isl_give isl_union_pw_qpolynomial_fold *
        isl_union_map_apply_union_pw_qpolynomial_fold(
                __isl_take isl_union_map *umap,
                __isl_take isl_union_pw_qpolynomial_fold *upwf,
                int *tight);
 
-These functions
+The functions taking a map
 compose the given map with the given piecewise quasipolynomial reduction.
 That is, compute a bound (of the same type as C<pwf> or C<upwf> itself)
 over all elements in the intersection of the range of the map
 and the domain of the piecewise quasipolynomial reduction
 as a function of an element in the domain of the map.
+The functions taking a set compute a bound over all elements in the
+intersection of the set and the domain of the
+piecewise quasipolynomial reduction.
 
 =head2 Dependence Analysis
 
index b33728c..7c950c2 100644 (file)
@@ -376,6 +376,9 @@ __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_bound(
        __isl_take isl_pw_qpolynomial *pwqp, enum isl_fold type, int *tight);
 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_bound(
        __isl_take isl_pw_qpolynomial_fold *pwf, int *tight);
+__isl_give isl_pw_qpolynomial_fold *isl_set_apply_pw_qpolynomial_fold(
+       __isl_take isl_set *set, __isl_take isl_pw_qpolynomial_fold *pwf,
+       int *tight);
 __isl_give isl_pw_qpolynomial_fold *isl_map_apply_pw_qpolynomial_fold(
        __isl_take isl_map *map, __isl_take isl_pw_qpolynomial_fold *pwf,
        int *tight);
@@ -503,6 +506,9 @@ __isl_give isl_printer *isl_printer_print_union_pw_qpolynomial_fold(
 __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_bound(
        __isl_take isl_union_pw_qpolynomial *upwqp,
        enum isl_fold type, int *tight);
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_set_apply_union_pw_qpolynomial_fold(
+       __isl_take isl_union_set *uset,
+       __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight);
 __isl_give isl_union_pw_qpolynomial_fold *isl_union_map_apply_union_pw_qpolynomial_fold(
        __isl_take isl_union_map *umap,
        __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight);
index 57e7af5..b6ca0ce 100644 (file)
@@ -1391,6 +1391,16 @@ error:
        return NULL;
 }
 
+__isl_give isl_pw_qpolynomial_fold *isl_set_apply_pw_qpolynomial_fold(
+       __isl_take isl_set *set, __isl_take isl_pw_qpolynomial_fold *pwf,
+       int *tight)
+{
+       isl_map *map;
+
+       map = isl_map_from_range(set);
+       return isl_map_apply_pw_qpolynomial_fold(map, pwf, tight);
+}
+
 struct isl_apply_fold_data {
        isl_union_pw_qpolynomial_fold *upwf;
        isl_union_pw_qpolynomial_fold *res;
@@ -1471,6 +1481,13 @@ error:
        return NULL;
 }
 
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_set_apply_union_pw_qpolynomial_fold(
+       __isl_take isl_union_set *uset,
+       __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight)
+{
+       return isl_union_map_apply_union_pw_qpolynomial_fold(uset, upwf, tight);
+}
+
 /* Reorder the dimension of "fold" according to the given reordering.
  */
 __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_realign(