__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_alloc(
__isl_take isl_set *set,
__isl_take isl_qpolynomial *qp);
+ __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_qpolynomial(
+ __isl_take isl_qpolynomial *qp);
__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_zero(
__isl_take isl_dim *dim);
__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_zero(__isl_take isl_dim *dim);
__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_alloc(__isl_take isl_set *set,
__isl_take isl_qpolynomial *qp);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_qpolynomial(
+ __isl_take isl_qpolynomial *qp);
__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_copy(
__isl_keep isl_pw_qpolynomial *pwqp);
void *isl_pw_qpolynomial_free(__isl_take isl_pw_qpolynomial *pwqp);
return NULL;
}
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_qpolynomial(
+ __isl_take isl_qpolynomial *qp)
+{
+ isl_set *dom;
+
+ if (!qp)
+ return NULL;
+ if (isl_qpolynomial_is_zero(qp)) {
+ isl_dim *dim = isl_qpolynomial_get_dim(qp);
+ isl_qpolynomial_free(qp);
+ return isl_pw_qpolynomial_zero(dim);
+ }
+
+ dom = isl_set_universe(isl_qpolynomial_get_dim(qp));
+ return isl_pw_qpolynomial_alloc(dom, qp);
+}
+
#undef PW
#define PW isl_pw_qpolynomial
#undef EL