Polly 20.0.0git
isl_bernstein.c
Go to the documentation of this file.
1/*
2 * Copyright 2006-2007 Universiteit Leiden
3 * Copyright 2008-2009 Katholieke Universiteit Leuven
4 * Copyright 2010 INRIA Saclay
5 *
6 * Use of this software is governed by the MIT license
7 *
8 * Written by Sven Verdoolaege, Leiden Institute of Advanced Computer Science,
9 * Universiteit Leiden, Niels Bohrweg 1, 2333 CA Leiden, The Netherlands
10 * and K.U.Leuven, Departement Computerwetenschappen, Celestijnenlaan 200A,
11 * B-3001 Leuven, Belgium
12 * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite,
13 * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France
14 */
15
16#include <isl_ctx_private.h>
17#include <isl_map_private.h>
18#include <isl/set.h>
19#include <isl_seq.h>
20#include <isl_morph.h>
21#include <isl_factorization.h>
24#include <isl_options_private.h>
25#include <isl_vec_private.h>
26#include <isl_bernstein.h>
27
32
34
39};
40
42{
43 isl_size nvar;
44 isl_size nparam;
45 int i;
46
47 nvar = isl_basic_set_dim(vertex, isl_dim_set);
48 nparam = isl_basic_set_dim(vertex, isl_dim_param);
49 if (nvar < 0 || nparam < 0)
50 return isl_bool_error;
51 for (i = 0; i < nvar; ++i) {
52 int r = nvar - 1 - i;
53 if (!isl_int_is_one(vertex->eq[r][1 + nparam + i]) &&
54 !isl_int_is_negone(vertex->eq[r][1 + nparam + i]))
55 return isl_bool_false;
56 }
57
58 return isl_bool_true;
59}
60
62 __isl_keep isl_basic_set *vertex, int i, __isl_take isl_space *space)
63{
64 isl_size nvar;
65 isl_size nparam;
67 int r;
68 isl_int denom;
70
71 isl_int_init(denom);
72
73 nvar = isl_basic_set_dim(vertex, isl_dim_set);
74 nparam = isl_basic_set_dim(vertex, isl_dim_param);
76 if (nvar < 0 || nparam < 0 || total < 0)
77 goto error;
78 r = nvar - 1 - i;
79
80 isl_int_set(denom, vertex->eq[r][1 + nparam + i]);
81 isl_assert(vertex->ctx, !isl_int_is_zero(denom), goto error);
82
83 if (isl_int_is_pos(denom))
84 isl_seq_neg(vertex->eq[r], vertex->eq[r], 1 + total);
85 else
86 isl_int_neg(denom, denom);
87
88 v = isl_qpolynomial_from_affine(space, vertex->eq[r], denom);
89 isl_int_clear(denom);
90
91 return v;
92error:
93 isl_space_free(space);
94 isl_int_clear(denom);
95 return NULL;
96}
97
98/* Check whether the bound associated to the selection "k" is tight,
99 * which is the case if we select exactly one vertex (i.e., one of the
100 * exponents in "k" is exactly "d") and if that vertex
101 * is integral for all values of the parameters.
102 *
103 * If the degree "d" is zero, then there are no exponents.
104 * Since the polynomial is a constant expression in this case,
105 * the bound is necessarily tight.
106 */
107static isl_bool is_tight(int *k, int n, int d, isl_cell *cell)
108{
109 int i;
110
111 if (d == 0)
112 return isl_bool_true;
113
114 for (i = 0; i < n; ++i) {
115 int v;
116 if (!k[i])
117 continue;
118 if (k[i] != d)
119 return isl_bool_false;
120 v = cell->ids[n - 1 - i];
121 return vertex_is_integral(cell->vertices->v[v].vertex);
122 }
123
124 return isl_bool_false;
125}
126
128 int *k, int n, int d, struct bernstein_data *data)
129{
132
133 fold = isl_qpolynomial_fold_alloc(data->type, b);
134
136 if (data->check_tight)
137 tight = is_tight(k, n, d, data->cell);
138 if (tight < 0)
139 return isl_stat_error;
140 if (tight)
142 data->fold_tight, fold);
143 else
145 data->fold, fold);
146 return isl_stat_ok;
147}
148
149/* Extract the coefficients of the Bernstein base polynomials and store
150 * them in data->fold and data->fold_tight.
151 *
152 * In particular, the coefficient of each monomial
153 * of multi-degree (k[0], k[1], ..., k[n-1]) is divided by the corresponding
154 * multinomial coefficient d!/k[0]! k[1]! ... k[n-1]!
155 *
156 * c[i] contains the coefficient of the selected powers of the first i+1 vars.
157 * multinom[i] contains the partial multinomial coefficient.
158 */
160 __isl_keep isl_set *dom, struct bernstein_data *data)
161{
162 int i;
163 int d;
164 isl_size n;
165 isl_ctx *ctx;
166 isl_qpolynomial **c = NULL;
167 int *k = NULL;
168 int *left = NULL;
169 isl_vec *multinom = NULL;
170
172 if (n < 0)
173 return isl_stat_error;
174
177 isl_assert(ctx, n >= 2, return isl_stat_error);
178
180 k = isl_alloc_array(ctx, int, n);
181 left = isl_alloc_array(ctx, int, n);
182 multinom = isl_vec_alloc(ctx, n);
183 if (!c || !k || !left || !multinom)
184 goto error;
185
186 isl_int_set_si(multinom->el[0], 1);
187 for (k[0] = d; k[0] >= 0; --k[0]) {
188 int i = 1;
190 c[0] = isl_qpolynomial_coeff(poly, isl_dim_in, n - 1, k[0]);
191 left[0] = d - k[0];
192 k[1] = -1;
193 isl_int_set(multinom->el[1], multinom->el[0]);
194 while (i > 0) {
195 if (i == n - 1) {
196 int j;
197 isl_space *space;
200 for (j = 2; j <= left[i - 1]; ++j)
201 isl_int_divexact_ui(multinom->el[i],
202 multinom->el[i], j);
204 n - 1 - i, left[i - 1]);
208 ctx->one, multinom->el[i]);
210 k[n - 1] = left[n - 2];
211 if (add_fold(b, dom, k, n, d, data) < 0)
212 goto error;
213 --i;
214 continue;
215 }
216 if (k[i] >= left[i - 1]) {
217 --i;
218 continue;
219 }
220 ++k[i];
221 if (k[i])
222 isl_int_divexact_ui(multinom->el[i],
223 multinom->el[i], k[i]);
225 c[i] = isl_qpolynomial_coeff(c[i - 1], isl_dim_in,
226 n - 1 - i, k[i]);
227 left[i] = left[i - 1] - k[i];
228 k[i + 1] = -1;
229 isl_int_set(multinom->el[i + 1], multinom->el[i]);
230 ++i;
231 }
232 isl_int_mul_ui(multinom->el[0], multinom->el[0], k[0]);
233 }
234
235 for (i = 0; i < n; ++i)
237
238 isl_vec_free(multinom);
239 free(left);
240 free(k);
241 free(c);
242 return isl_stat_ok;
243error:
244 isl_vec_free(multinom);
245 free(left);
246 free(k);
247 if (c)
248 for (i = 0; i < n; ++i)
250 free(c);
251 return isl_stat_error;
252}
253
254/* Perform bernstein expansion on the parametric vertices that are active
255 * on "cell".
256 *
257 * data->poly has been homogenized in the calling function.
258 *
259 * We plug in the barycentric coordinates for the set variables
260 *
261 * \vec x = \sum_i \alpha_i v_i(\vec p)
262 *
263 * and the constant "1 = \sum_i \alpha_i" for the homogeneous dimension.
264 * Next, we extract the coefficients of the Bernstein base polynomials.
265 */
267 void *user)
268{
269 int i, j;
270 struct bernstein_data *data = (struct bernstein_data *)user;
271 isl_space *space_param;
272 isl_space *space_dst;
273 isl_qpolynomial *poly = data->poly;
274 isl_size n_in;
275 unsigned nvar;
276 int n_vertices;
277 isl_qpolynomial **subs;
279 isl_set *dom;
280 isl_ctx *ctx;
281
283 if (n_in < 0)
284 goto error;
285
286 nvar = n_in - 1;
287 n_vertices = cell->n_vertices;
288
290 if (n_vertices > nvar + 1 && ctx->opt->bernstein_triangulate)
293
294 subs = isl_alloc_array(ctx, isl_qpolynomial *, 1 + nvar);
295 if (!subs)
296 goto error;
297
298 space_param = isl_basic_set_get_space(cell->dom);
300 space_dst = isl_space_add_dims(space_dst, isl_dim_set, n_vertices);
301
302 for (i = 0; i < 1 + nvar; ++i)
303 subs[i] =
305
306 for (i = 0; i < n_vertices; ++i) {
309 isl_dim_set, 1 + nvar + i);
310 for (j = 0; j < nvar; ++j) {
311 int k = cell->ids[i];
314 isl_space_copy(space_param));
316 1 + nvar + n_vertices);
318 subs[1 + j] = isl_qpolynomial_add(subs[1 + j], v);
319 }
320 subs[0] = isl_qpolynomial_add(subs[0], c);
321 }
322 isl_space_free(space_dst);
323
325
327 poly = isl_qpolynomial_substitute(poly, isl_dim_in, 0, 1 + nvar, subs);
329
330 data->cell = cell;
333 isl_space_copy(space_param));
334 data->fold_tight = isl_qpolynomial_fold_empty(data->type, space_param);
335 if (extract_coefficients(poly, dom, data) < 0) {
336 data->fold = isl_qpolynomial_fold_free(data->fold);
338 }
339
341 data->fold);
342 data->pwf = isl_pw_qpolynomial_fold_fold(data->pwf, pwf);
345
348 for (i = 0; i < 1 + nvar; ++i)
349 isl_qpolynomial_free(subs[i]);
350 free(subs);
351 return isl_stat_ok;
352error:
354 return isl_stat_error;
355}
356
357/* Base case of applying bernstein expansion.
358 *
359 * We compute the chamber decomposition of the parametric polytope "bset"
360 * and then perform bernstein expansion on the parametric vertices
361 * that are active on each chamber.
362 *
363 * If the polynomial does not depend on the set variables
364 * (and in particular if the number of set variables is zero)
365 * then the bound is equal to the polynomial and
366 * no actual bernstein expansion needs to be performed.
367 */
372{
373 int degree;
374 isl_size nvar;
375 isl_space *space;
376 isl_vertices *vertices;
377 isl_bool covers;
378
379 nvar = isl_basic_set_dim(bset, isl_dim_set);
380 if (nvar < 0)
381 bset = isl_basic_set_free(bset);
382 if (nvar == 0)
383 return isl_qpolynomial_cst_bound(bset, poly, data->type, tight);
384
386 if (degree < -1)
387 bset = isl_basic_set_free(bset);
388 if (degree <= 0)
389 return isl_qpolynomial_cst_bound(bset, poly, data->type, tight);
390
391 space = isl_basic_set_get_space(bset);
392 space = isl_space_params(space);
393 space = isl_space_from_domain(space);
394 space = isl_space_add_dims(space, isl_dim_set, 1);
396 data->type);
397 data->pwf_tight = isl_pw_qpolynomial_fold_zero(space, data->type);
399 vertices = isl_basic_set_compute_vertices(bset);
401 &bernstein_coefficients_cell, data) < 0)
402 data->pwf = isl_pw_qpolynomial_fold_free(data->pwf);
403 isl_vertices_free(vertices);
405
406 isl_basic_set_free(bset);
408
409 covers = isl_pw_qpolynomial_fold_covers(data->pwf_tight, data->pwf);
410 if (covers < 0)
411 goto error;
412
413 if (tight)
414 *tight = covers;
415
416 if (covers) {
418 return data->pwf_tight;
419 }
420
421 data->pwf = isl_pw_qpolynomial_fold_fold(data->pwf, data->pwf_tight);
422
423 return data->pwf;
424error:
427 return NULL;
428}
429
430/* Apply bernstein expansion recursively by working in on len[i]
431 * set variables at a time, with i ranging from n_group - 1 to 0.
432 */
435 int n_group, int *len, struct bernstein_data *data, isl_bool *tight)
436{
437 int i;
438 isl_size nparam;
439 isl_size nvar;
441
444 if (nparam < 0 || nvar < 0)
445 goto error;
446
448 isl_dim_in, 0, nvar - len[n_group - 1]);
450
451 for (i = n_group - 2; i >= 0; --i) {
453 if (nparam < 0)
456 isl_dim_param, nparam - len[i], len[i]);
457 if (tight && !*tight)
458 tight = NULL;
460 }
461
462 return pwf;
463error:
465 return NULL;
466}
467
472{
474 isl_set *set;
477
479 if (!f)
480 goto error;
481 if (f->n_group == 0) {
483 return bernstein_coefficients_base(bset, poly, data, tight);
484 }
485
489
490 pwf = bernstein_coefficients_recursive(pwqp, f->n_group, f->len, data,
491 tight);
492
494
495 return pwf;
496error:
497 isl_basic_set_free(bset);
499 return NULL;
500}
501
506{
507 int i;
508 int *len;
509 isl_size nvar;
511 isl_set *set;
513
514 nvar = isl_basic_set_dim(bset, isl_dim_set);
515 if (nvar < 0 || !poly)
516 goto error;
517
518 len = isl_alloc_array(bset->ctx, int, nvar);
519 if (nvar && !len)
520 goto error;
521
522 for (i = 0; i < nvar; ++i)
523 len[i] = 1;
524
527
528 pwf = bernstein_coefficients_recursive(pwqp, nvar, len, data, tight);
529
530 free(len);
531
532 return pwf;
533error:
534 isl_basic_set_free(bset);
536 return NULL;
537}
538
539/* Compute a bound on the polynomial defined over the parametric polytope
540 * using bernstein expansion and store the result
541 * in bound->pwf and bound->pwf_tight.
542 *
543 * If bernstein_recurse is set to ISL_BERNSTEIN_FACTORS, we check if
544 * the polytope can be factorized and apply bernstein expansion recursively
545 * on the factors.
546 * If bernstein_recurse is set to ISL_BERNSTEIN_INTERVALS, we apply
547 * bernstein expansion recursively on each dimension.
548 * Otherwise, we apply bernstein expansion on the entire polytope.
549 */
552 struct isl_bound *bound)
553{
554 struct bernstein_data data;
556 isl_size nvar;
558 isl_bool *tp = bound->check_tight ? &tight : NULL;
559
560 nvar = isl_basic_set_dim(bset, isl_dim_set);
561 if (nvar < 0 || !poly)
562 goto error;
563
564 data.type = bound->type;
565 data.check_tight = bound->check_tight;
566
567 if (bset->ctx->opt->bernstein_recurse & ISL_BERNSTEIN_FACTORS)
568 pwf = bernstein_coefficients_factors(bset, poly, &data, tp);
569 else if (nvar > 1 &&
570 (bset->ctx->opt->bernstein_recurse & ISL_BERNSTEIN_INTERVALS))
572 else
573 pwf = bernstein_coefficients_base(bset, poly, &data, tp);
574
575 if (tight)
577 else
578 return isl_bound_add(bound, pwf);
579error:
580 isl_basic_set_free(bset);
582 return isl_stat_error;
583}
#define __isl_take
Definition: ctx.h:22
isl_stat
Definition: ctx.h:84
@ isl_stat_error
Definition: ctx.h:85
@ isl_stat_ok
Definition: ctx.h:86
#define __isl_give
Definition: ctx.h:19
#define isl_assert(ctx, test, code)
Definition: ctx.h:152
#define isl_alloc_array(ctx, type, n)
Definition: ctx.h:131
#define isl_calloc_array(ctx, type, n)
Definition: ctx.h:132
#define __isl_keep
Definition: ctx.h:25
int isl_size
Definition: ctx.h:96
isl_bool
Definition: ctx.h:89
@ isl_bool_false
Definition: ctx.h:91
@ isl_bool_true
Definition: ctx.h:92
@ isl_bool_error
Definition: ctx.h:90
isl_stat isl_stat(*) void user)
Definition: hmap.h:39
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)
Definition: isl_bernstein.c:41
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)
Definition: isl_bernstein.c:61
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)
Definition: isl_bound.c:24
isl_stat isl_bound_add(struct isl_bound *bound, __isl_take isl_pw_qpolynomial_fold *pwf)
Definition: isl_bound.c:43
isl_stat isl_bound_add_tight(struct isl_bound *bound, __isl_take isl_pw_qpolynomial_fold *pwf)
Definition: isl_bound.c:53
__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)
Definition: isl_fold.c:724
isl_bool isl_pw_qpolynomial_fold_covers(__isl_keep isl_pw_qpolynomial_fold *pwf1, __isl_keep isl_pw_qpolynomial_fold *pwf2)
Definition: isl_fold.c:1543
#define isl_int_is_zero(i)
Definition: isl_int.h:31
#define isl_int_is_one(i)
Definition: isl_int.h:32
#define isl_int_is_pos(i)
Definition: isl_int.h:34
#define isl_int_is_negone(i)
Definition: isl_int.h:33
#define isl_int_divexact_ui(r, i, j)
Definition: isl_int_gmp.h:45
#define isl_int_neg(r, i)
Definition: isl_int_gmp.h:24
#define isl_int_set(r, i)
Definition: isl_int_gmp.h:14
#define isl_int_mul_ui(r, i, j)
Definition: isl_int_gmp.h:35
#define isl_int_set_si(r, i)
Definition: isl_int_gmp.h:15
#define isl_int_init(i)
Definition: isl_int_gmp.h:11
#define isl_int_clear(i)
Definition: isl_int_gmp.h:12
__isl_give isl_morph * isl_morph_copy(__isl_keep isl_morph *morph)
Definition: isl_morph.c:59
static struct isl_arg_choice bound[]
Definition: isl_options.c:39
#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)
Definition: isl_seq.c:35
const char * pwqp
Definition: isl_test.c:3786
const char * poly
Definition: isl_test.c:4018
const char * set
Definition: isl_test.c:1356
int tight
Definition: isl_test.c:4016
const char * f
Definition: isl_test.c:8642
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_set isl_set
Definition: map_type.h:26
struct isl_basic_set isl_basic_set
Definition: map_type.h:20
__isl_give isl_qpolynomial_fold * isl_qpolynomial_fold_empty(enum isl_fold type, __isl_take isl_space *space)
Definition: isl_fold.c:973
__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)
Definition: isl_fold.c:1115
__isl_null isl_qpolynomial_fold * isl_qpolynomial_fold_free(__isl_take isl_qpolynomial_fold *fold)
Definition: isl_fold.c:1035
__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)
Definition: isl_fold.c:989
__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)
Definition: isl_bound.c:298
__isl_give isl_pw_qpolynomial_fold * isl_pw_qpolynomial_bound(__isl_take isl_pw_qpolynomial *pwqp, enum isl_fold type, isl_bool *tight)
Definition: isl_bound.c:370
__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_fold
b(9)
isl_size isl_basic_set_dim(__isl_keep isl_basic_set *bset, enum isl_dim_type type)
Definition: isl_map.c:201
__isl_give isl_space * isl_basic_set_get_space(__isl_keep isl_basic_set *bset)
Definition: isl_map.c:421
__isl_null isl_basic_set * isl_basic_set_free(__isl_take isl_basic_set *bset)
Definition: isl_map.c:1523
__isl_give isl_set * isl_set_copy(__isl_keep isl_set *set)
Definition: isl_map.c:1470
__isl_constructor __isl_give isl_set * isl_set_from_basic_set(__isl_take isl_basic_set *bset)
Definition: isl_map.c:3482
__isl_give isl_basic_set * isl_basic_set_copy(__isl_keep isl_basic_set *bset)
Definition: isl_map.c:1465
__isl_null isl_space * isl_space_free(__isl_take isl_space *space)
Definition: isl_space.c:445
__isl_give isl_space * isl_space_from_domain(__isl_take isl_space *space)
Definition: isl_space.c:2148
__isl_export __isl_give isl_space * isl_space_params(__isl_take isl_space *space)
Definition: isl_space.c:2211
__isl_give isl_space * isl_space_copy(__isl_keep isl_space *space)
Definition: isl_space.c:436
__isl_give isl_space * isl_space_add_dims(__isl_take isl_space *space, enum isl_dim_type type, unsigned n)
Definition: isl_space.c:1229
@ isl_dim_param
Definition: space_type.h:15
@ isl_dim_in
Definition: space_type.h:16
@ isl_dim_set
Definition: space_type.h:18
@ isl_dim_all
Definition: space_type.h:20
isl_qpolynomial_fold * fold_tight
Definition: isl_bernstein.c:36
enum isl_fold type
Definition: isl_bernstein.c:29
isl_qpolynomial * poly
Definition: isl_bernstein.c:30
isl_qpolynomial_fold * fold
Definition: isl_bernstein.c:35
isl_cell * cell
Definition: isl_bernstein.c:33
isl_pw_qpolynomial_fold * pwf_tight
Definition: isl_bernstein.c:38
isl_pw_qpolynomial_fold * pwf
Definition: isl_bernstein.c:37
isl_vertices * vertices
isl_basic_set * dom
struct isl_options * opt
isl_int one
isl_int * el
isl_basic_set * vertex
struct isl_vertex * v
__isl_null isl_vec * isl_vec_free(__isl_take isl_vec *vec)
Definition: isl_vec.c:234
__isl_give isl_vec * isl_vec_alloc(isl_ctx *ctx, unsigned size)
Definition: isl_vec.c:33
__isl_null isl_vertices * isl_vertices_free(__isl_take isl_vertices *vertices)
Definition: isl_vertices.c:38
__isl_give isl_vertices * isl_basic_set_compute_vertices(__isl_keep isl_basic_set *bset)
Definition: isl_vertices.c:418
__isl_null isl_cell * isl_cell_free(__isl_take isl_cell *cell)
n
Definition: youcefn.c:8