@@ -554,7 +554,7 @@ QuasiPolynomial mlir::presburger::detail::getCoefficientInRationalFunction(
554
554
// / t^num / \prod_j (1 - t^dens[j]).
555
555
// / v represents the affine functions whose floors are multiplied by the
556
556
// / generators, and ds represents the list of generators.
557
- std::pair<QuasiPolynomial, std::vector<Fraction>>
557
+ static std::pair<QuasiPolynomial, std::vector<Fraction>>
558
558
substituteMuInTerm (unsigned numParams, const ParamPoint &v,
559
559
const std::vector<Point> &ds, const Point &mu) {
560
560
unsigned numDims = mu.size ();
@@ -606,8 +606,8 @@ substituteMuInTerm(unsigned numParams, const ParamPoint &v,
606
606
// / Here, sign = ± 1,
607
607
// / num is a QuasiPolynomial, and
608
608
// / each dens[j] is a Fraction.
609
- void normalizeDenominatorExponents (int &sign, QuasiPolynomial &num,
610
- std::vector<Fraction> &dens) {
609
+ static void normalizeDenominatorExponents (int &sign, QuasiPolynomial &num,
610
+ std::vector<Fraction> &dens) {
611
611
// We track the number of exponents that are negative in the
612
612
// denominator, and convert them to their absolute values.
613
613
unsigned numNegExps = 0 ;
@@ -634,8 +634,8 @@ void normalizeDenominatorExponents(int &sign, QuasiPolynomial &num,
634
634
635
635
// / Compute the binomial coefficients nCi for 0 ≤ i ≤ r,
636
636
// / where n is a QuasiPolynomial.
637
- std::vector<QuasiPolynomial> getBinomialCoefficients ( const QuasiPolynomial &n,
638
- unsigned r) {
637
+ static std::vector<QuasiPolynomial>
638
+ getBinomialCoefficients ( const QuasiPolynomial &n, unsigned r) {
639
639
unsigned numParams = n.getNumInputs ();
640
640
std::vector<QuasiPolynomial> coefficients;
641
641
coefficients.reserve (r + 1 );
@@ -651,8 +651,8 @@ std::vector<QuasiPolynomial> getBinomialCoefficients(const QuasiPolynomial &n,
651
651
652
652
// / Compute the binomial coefficients nCi for 0 ≤ i ≤ r,
653
653
// / where n is a QuasiPolynomial.
654
- std::vector<Fraction> getBinomialCoefficients (const Fraction &n,
655
- const Fraction &r) {
654
+ static std::vector<Fraction> getBinomialCoefficients (const Fraction &n,
655
+ const Fraction &r) {
656
656
std::vector<Fraction> coefficients;
657
657
coefficients.reserve ((int64_t )floor (r));
658
658
coefficients.emplace_back (1 );
0 commit comments