#include <isl_point_private.h>
#include <isl_dim_private.h>
#include <isl_map_private.h>
-#include <isl_lp.h>
-#include <isl_seq.h>
+#include <isl/lp.h>
+#include <isl/seq.h>
+#include <isl_mat_private.h>
static __isl_give isl_qpolynomial_fold *qpolynomial_fold_alloc(
enum isl_fold type, __isl_take isl_dim *dim, int n)
return 0;
}
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_set_dim_name(
+ __isl_take isl_qpolynomial_fold *fold,
+ enum isl_dim_type type, unsigned pos, const char *s)
+{
+ int i;
+
+ fold = isl_qpolynomial_fold_cow(fold);
+ if (!fold)
+ return NULL;
+ fold->dim = isl_dim_set_name(fold->dim, type, pos, s);
+ if (!fold->dim)
+ goto error;
+
+ for (i = 0; i < fold->n; ++i) {
+ fold->qp[i] = isl_qpolynomial_set_dim_name(fold->qp[i],
+ type, pos, s);
+ if (!fold->qp[i])
+ goto error;
+ }
+
+ return fold;
+error:
+ isl_qpolynomial_fold_free(fold);
+ return NULL;
+}
+
__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_drop_dims(
__isl_take isl_qpolynomial_fold *fold,
enum isl_dim_type type, unsigned first, unsigned n)
isl_qpolynomial *t;
min = isl_qpolynomial_cst(isl_dim_copy(qp->dim), l);
- base = isl_qpolynomial_pow(isl_dim_copy(qp->dim),
+ base = isl_qpolynomial_var_pow(isl_dim_copy(qp->dim),
qp->upoly->var, 1);
r = isl_qpolynomial_alloc(isl_dim_copy(qp->dim), 0,
return NULL;
}
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist(
+ __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context)
+{
+ int i;
+
+ if (!fold || !context)
+ goto error;
+
+ fold = isl_qpolynomial_fold_cow(fold);
+ if (!fold)
+ return NULL;
+
+ for (i = 0; i < fold->n; ++i) {
+ fold->qp[i] = isl_qpolynomial_gist(fold->qp[i],
+ isl_set_copy(context));
+ if (!fold->qp[i])
+ goto error;
+ }
+
+ isl_set_free(context);
+ return fold;
+error:
+ isl_set_free(context);
+ isl_qpolynomial_fold_free(fold);
+ return NULL;
+}
+
#define HAS_TYPE
#undef PW