add isl_pw_qpolynomial_fold_project_domain_on_params
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 26 Aug 2011 20:22:08 +0000 (22:22 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 3 Sep 2011 10:04:55 +0000 (12:04 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/polynomial.h
isl_pw_templ.c

index 9fd3b4b..3987178 100644 (file)
@@ -3126,6 +3126,8 @@ are returned in C<*n> and C<*d>, respectively.
 
        __isl_give isl_qpolynomial *isl_qpolynomial_project_domain_on_params(
                __isl_take isl_qpolynomial *qp);
+       __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_project_domain_on_params(
+               __isl_take isl_pw_qpolynomial *pwqp);
 
        __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_coalesce(
                __isl_take isl_union_pw_qpolynomial *upwqp);
@@ -3294,6 +3296,9 @@ To iterate over all quasipolynomials in a reduction, use
                __isl_take isl_union_pw_qpolynomial_fold *upwf,
                __isl_take isl_union_set *uset);
 
+       __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_project_domain_on_params(
+               __isl_take isl_pw_qpolynomial_fold *pwf);
+
        __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_coalesce(
                __isl_take isl_pw_qpolynomial_fold *pwf);
 
index 05f034b..0f3c0ab 100644 (file)
@@ -166,6 +166,8 @@ __isl_give isl_set *isl_pw_qpolynomial_domain(__isl_take isl_pw_qpolynomial *pwq
 __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_intersect_domain(
        __isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set);
 
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_project_domain_on_params(
+       __isl_take isl_pw_qpolynomial *pwqp);
 __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_drop_dims(
        __isl_take isl_pw_qpolynomial *pwqp,
        enum isl_dim_type type, unsigned first, unsigned n);
@@ -350,6 +352,8 @@ __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add_disjoint(
 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_mul_isl_int(
        __isl_take isl_pw_qpolynomial_fold *pwf, isl_int v);
 
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_project_domain_on_params(
+       __isl_take isl_pw_qpolynomial_fold *pwf);
 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_drop_dims(
        __isl_take isl_pw_qpolynomial_fold *pwf,
        enum isl_dim_type type, unsigned first, unsigned n);
index aa5fda4..b1bdf0a 100644 (file)
@@ -826,6 +826,21 @@ error:
        FN(PW,free)(pw);
        return NULL;
 }
+
+/* Project the domain of pw onto its parameter space.
+ */
+__isl_give PW *FN(PW,project_domain_on_params)(__isl_take PW *pw)
+{
+       isl_space *space;
+       unsigned n;
+
+       n = FN(PW,dim)(pw, isl_dim_set);
+       pw = FN(PW,project_out)(pw, isl_dim_set, 0, n);
+       space = FN(PW,get_space)(pw);
+       space = isl_space_params(space);
+       pw = FN(PW,reset_space)(pw, space);
+       return pw;
+}
 #endif
 
 #ifndef NO_INSERT_DIMS