49 if (nvar < 0 || nparam < 0)
51 for (i = 0; i < nvar; ++i) {
76 if (nvar < 0 || nparam < 0 ||
total < 0)
114 for (i = 0; i <
n; ++i) {
120 v = cell->
ids[
n - 1 - i];
183 if (!c || !k || !left || !multinom)
187 for (k[0] = d; k[0] >= 0; --k[0]) {
200 for (j = 2; j <= left[i - 1]; ++j)
204 n - 1 - i, left[i - 1]);
208 ctx->
one, multinom->
el[i]);
210 k[
n - 1] = left[
n - 2];
216 if (k[i] >= left[i - 1]) {
223 multinom->
el[i], k[i]);
227 left[i] = left[i - 1] - k[i];
235 for (i = 0; i <
n; ++i)
248 for (i = 0; i <
n; ++i)
302 for (i = 0; i < 1 + nvar; ++i)
306 for (i = 0; i < n_vertices; ++i) {
310 for (j = 0; j < nvar; ++j) {
316 1 + nvar + n_vertices);
348 for (i = 0; i < 1 + nvar; ++i)
444 if (nparam < 0 || nvar < 0)
451 for (i = n_group - 2; i >= 0; --i) {
481 if (
f->n_group == 0) {
515 if (nvar < 0 || !
poly)
522 for (i = 0; i < nvar; ++i)
561 if (nvar < 0 || !
poly)
#define isl_assert(ctx, test, code)
#define isl_alloc_array(ctx, type, n)
#define isl_calloc_array(ctx, type, n)
isl_stat isl_stat(*) void user)
static __isl_give isl_pw_qpolynomial_fold * bernstein_coefficients_base(__isl_take isl_basic_set *bset, __isl_take isl_qpolynomial *poly, struct bernstein_data *data, isl_bool *tight)
static __isl_give isl_pw_qpolynomial_fold * bernstein_coefficients_factors(__isl_take isl_basic_set *bset, __isl_take isl_qpolynomial *poly, struct bernstein_data *data, isl_bool *tight)
static isl_stat bernstein_coefficients_cell(__isl_take isl_cell *cell, void *user)
static __isl_give isl_pw_qpolynomial_fold * bernstein_coefficients_full_recursive(__isl_take isl_basic_set *bset, __isl_take isl_qpolynomial *poly, struct bernstein_data *data, isl_bool *tight)
static isl_bool vertex_is_integral(__isl_keep isl_basic_set *vertex)
static isl_stat extract_coefficients(isl_qpolynomial *poly, __isl_keep isl_set *dom, struct bernstein_data *data)
static __isl_give isl_pw_qpolynomial_fold * bernstein_coefficients_recursive(__isl_take isl_pw_qpolynomial *pwqp, int n_group, int *len, struct bernstein_data *data, isl_bool *tight)
static __isl_give isl_qpolynomial * vertex_coordinate(__isl_keep isl_basic_set *vertex, int i, __isl_take isl_space *space)
static isl_stat add_fold(__isl_take isl_qpolynomial *b, __isl_keep isl_set *dom, int *k, int n, int d, struct bernstein_data *data)
isl_stat isl_qpolynomial_bound_on_domain_bernstein(__isl_take isl_basic_set *bset, __isl_take isl_qpolynomial *poly, struct isl_bound *bound)
static isl_bool is_tight(int *k, int n, int d, isl_cell *cell)
__isl_give isl_pw_qpolynomial_fold * isl_qpolynomial_cst_bound(__isl_take isl_basic_set *bset, __isl_take isl_qpolynomial *poly, enum isl_fold type, isl_bool *tight)
isl_stat isl_bound_add(struct isl_bound *bound, __isl_take isl_pw_qpolynomial_fold *pwf)
isl_stat isl_bound_add_tight(struct isl_bound *bound, __isl_take isl_pw_qpolynomial_fold *pwf)
__isl_give isl_factorizer * isl_basic_set_factorizer(__isl_keep isl_basic_set *bset)
__isl_null isl_factorizer * isl_factorizer_free(__isl_take isl_factorizer *f)
__isl_give isl_qpolynomial_fold * isl_qpolynomial_fold_fold_on_domain(__isl_keep isl_set *set, __isl_take isl_qpolynomial_fold *fold1, __isl_take isl_qpolynomial_fold *fold2)
isl_bool isl_pw_qpolynomial_fold_covers(__isl_keep isl_pw_qpolynomial_fold *pwf1, __isl_keep isl_pw_qpolynomial_fold *pwf2)
#define isl_int_is_zero(i)
#define isl_int_is_one(i)
#define isl_int_is_pos(i)
#define isl_int_is_negone(i)
#define isl_int_divexact_ui(r, i, j)
#define isl_int_neg(r, i)
#define isl_int_set(r, i)
#define isl_int_mul_ui(r, i, j)
#define isl_int_set_si(r, i)
__isl_give isl_morph * isl_morph_copy(__isl_keep isl_morph *morph)
static struct isl_arg_choice bound[]
#define ISL_BERNSTEIN_INTERVALS
#define ISL_BERNSTEIN_FACTORS
__isl_give isl_qpolynomial * isl_qpolynomial_from_affine(__isl_take isl_space *space, isl_int *f, isl_int denom)
__isl_give isl_qpolynomial * isl_qpolynomial_coeff(__isl_keep isl_qpolynomial *qp, enum isl_dim_type type, unsigned t_pos, int deg)
int isl_qpolynomial_degree(__isl_keep isl_qpolynomial *poly)
__isl_give isl_qpolynomial * isl_qpolynomial_rat_cst_on_domain(__isl_take isl_space *domain, const isl_int n, const isl_int d)
__isl_give isl_pw_qpolynomial * isl_pw_qpolynomial_morph_domain(__isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_morph *morph)
void isl_seq_neg(isl_int *dst, isl_int *src, unsigned len)
static __isl_give isl_union_map * total(__isl_take isl_union_map *umap, __isl_give isl_map *(*fn)(__isl_take isl_map *))
isl_stat isl_cell_foreach_simplex(__isl_take isl_cell *cell, isl_stat(*fn)(__isl_take isl_cell *simplex, void *user), void *user)
isl_stat isl_vertices_foreach_disjoint_cell(__isl_keep isl_vertices *vertices, isl_stat(*fn)(__isl_take isl_cell *cell, void *user), void *user)
struct isl_basic_set isl_basic_set
__isl_give isl_qpolynomial_fold * isl_qpolynomial_fold_empty(enum isl_fold type, __isl_take isl_space *space)
__isl_give isl_qpolynomial * isl_qpolynomial_var_on_domain(__isl_take isl_space *domain, enum isl_dim_type type, unsigned pos)
__isl_give isl_pw_qpolynomial_fold * isl_pw_qpolynomial_fold_fold(__isl_take isl_pw_qpolynomial_fold *pwf1, __isl_take isl_pw_qpolynomial_fold *pwf2)
__isl_null isl_qpolynomial_fold * isl_qpolynomial_fold_free(__isl_take isl_qpolynomial_fold *fold)
__isl_give isl_pw_qpolynomial_fold * isl_pw_qpolynomial_fold_move_dims(__isl_take isl_pw_qpolynomial_fold *pwf, enum isl_dim_type dst_type, unsigned dst_pos, enum isl_dim_type src_type, unsigned src_pos, unsigned n)
isl_size isl_pw_qpolynomial_fold_dim(__isl_keep isl_pw_qpolynomial_fold *pwf, enum isl_dim_type type)
__isl_give isl_qpolynomial * isl_qpolynomial_homogenize(__isl_take isl_qpolynomial *poly)
__isl_null isl_pw_qpolynomial * isl_pw_qpolynomial_free(__isl_take isl_pw_qpolynomial *pwqp)
__isl_give isl_qpolynomial * isl_qpolynomial_mul(__isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2)
__isl_give isl_qpolynomial * isl_qpolynomial_copy(__isl_keep isl_qpolynomial *qp)
__isl_give isl_space * isl_qpolynomial_get_domain_space(__isl_keep isl_qpolynomial *qp)
__isl_null isl_qpolynomial * isl_qpolynomial_free(__isl_take isl_qpolynomial *qp)
__isl_give isl_pw_qpolynomial * isl_pw_qpolynomial_move_dims(__isl_take isl_pw_qpolynomial *pwqp, enum isl_dim_type dst_type, unsigned dst_pos, enum isl_dim_type src_type, unsigned src_pos, unsigned n)
__isl_give isl_qpolynomial * isl_qpolynomial_project_domain_on_params(__isl_take isl_qpolynomial *qp)
__isl_give isl_pw_qpolynomial_fold * isl_pw_qpolynomial_fold_alloc(enum isl_fold type, __isl_take isl_set *set, __isl_take isl_qpolynomial_fold *fold)
__isl_give isl_qpolynomial * isl_qpolynomial_zero_on_domain(__isl_take isl_space *domain)
isl_size isl_pw_qpolynomial_dim(__isl_keep isl_pw_qpolynomial *pwqp, enum isl_dim_type type)
isl_size isl_qpolynomial_dim(__isl_keep isl_qpolynomial *qp, enum isl_dim_type type)
__isl_give isl_qpolynomial_fold * isl_qpolynomial_fold_alloc(enum isl_fold type, __isl_take isl_qpolynomial *qp)
__isl_give isl_qpolynomial * isl_qpolynomial_add(__isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2)
__isl_give isl_pw_qpolynomial * isl_pw_qpolynomial_alloc(__isl_take isl_set *set, __isl_take isl_qpolynomial *qp)
__isl_give isl_qpolynomial * isl_qpolynomial_add_dims(__isl_take isl_qpolynomial *qp, enum isl_dim_type type, unsigned n)
__isl_null isl_pw_qpolynomial_fold * isl_pw_qpolynomial_fold_free(__isl_take isl_pw_qpolynomial_fold *pwf)
__isl_give isl_pw_qpolynomial_fold * isl_pw_qpolynomial_fold_zero(__isl_take isl_space *space, enum isl_fold type)
__isl_give isl_qpolynomial * isl_qpolynomial_substitute(__isl_take isl_qpolynomial *qp, enum isl_dim_type type, unsigned first, unsigned n, __isl_keep isl_qpolynomial **subs)
__isl_give isl_pw_qpolynomial_fold * isl_pw_qpolynomial_fold_bound(__isl_take isl_pw_qpolynomial_fold *pwf, isl_bool *tight)
__isl_give isl_pw_qpolynomial_fold * isl_pw_qpolynomial_bound(__isl_take isl_pw_qpolynomial *pwqp, enum isl_fold type, isl_bool *tight)
__isl_give isl_qpolynomial * isl_qpolynomial_drop_dims(__isl_take isl_qpolynomial *qp, enum isl_dim_type type, unsigned first, unsigned n)
isl_ctx * isl_qpolynomial_get_ctx(__isl_keep isl_qpolynomial *qp)
isl_size isl_basic_set_dim(__isl_keep isl_basic_set *bset, enum isl_dim_type type)
__isl_give isl_space * isl_basic_set_get_space(__isl_keep isl_basic_set *bset)
__isl_null isl_basic_set * isl_basic_set_free(__isl_take isl_basic_set *bset)
__isl_give isl_set * isl_set_copy(__isl_keep isl_set *set)
__isl_constructor __isl_give isl_set * isl_set_from_basic_set(__isl_take isl_basic_set *bset)
__isl_give isl_basic_set * isl_basic_set_copy(__isl_keep isl_basic_set *bset)
__isl_null isl_space * isl_space_free(__isl_take isl_space *space)
__isl_give isl_space * isl_space_from_domain(__isl_take isl_space *space)
__isl_export __isl_give isl_space * isl_space_params(__isl_take isl_space *space)
__isl_give isl_space * isl_space_copy(__isl_keep isl_space *space)
__isl_give isl_space * isl_space_add_dims(__isl_take isl_space *space, enum isl_dim_type type, unsigned n)
isl_qpolynomial_fold * fold_tight
isl_qpolynomial_fold * fold
isl_pw_qpolynomial_fold * pwf_tight
isl_pw_qpolynomial_fold * pwf
int bernstein_triangulate
__isl_null isl_vec * isl_vec_free(__isl_take isl_vec *vec)
__isl_give isl_vec * isl_vec_alloc(isl_ctx *ctx, unsigned size)
__isl_null isl_vertices * isl_vertices_free(__isl_take isl_vertices *vertices)
__isl_give isl_vertices * isl_basic_set_compute_vertices(__isl_keep isl_basic_set *bset)
__isl_null isl_cell * isl_cell_free(__isl_take isl_cell *cell)