1 #include <isl/polynomial.h>
3 #include "size_bernstein.h"
7 size::enumerator
*selfloop_size_bernstein(pdg::PDG
*pdg
,
8 __isl_take isl_map
*dep
, __isl_take isl_set
*read
)
10 isl_pw_qpolynomial
*pwqp
;
11 isl_pw_qpolynomial_fold
*ub
;
13 pwqp
= selfloop_tokens_in_fifo(dep
, read
);
15 ub
= isl_pw_qpolynomial_bound(pwqp
, isl_fold_max
, NULL
);
16 ub
= isl_pw_qpolynomial_fold_coalesce(ub
);
18 ub
= isl_pw_qpolynomial_fold_gist(ub
, pdg
->get_context_isl_set());
20 return new size::enumerator(ub
, pdg
);