@@ -61,7 +61,7 @@ ConeH mlir::presburger::detail::getDual(ConeV cone) {
61
61
}
62
62
63
63
// / Find the index of a cone in V-representation.
64
- MPInt mlir::presburger::detail::getIndex (ConeV cone) {
64
+ MPInt mlir::presburger::detail::getIndex (const ConeV & cone) {
65
65
if (cone.getNumRows () > cone.getNumColumns ())
66
66
return MPInt (0 );
67
67
@@ -79,7 +79,7 @@ MPInt mlir::presburger::detail::getIndex(ConeV cone) {
79
79
// / coefficients.
80
80
GeneratingFunction
81
81
mlir::presburger::detail::computeUnimodularConeGeneratingFunction (
82
- ParamPoint vertex, int sign, ConeH cone) {
82
+ ParamPoint vertex, int sign, const ConeH & cone) {
83
83
// Consider a cone with H-representation [0 -1].
84
84
// [-1 -2]
85
85
// Let the vertex be given by the matrix [ 2 2 0], with 2 params.
@@ -556,8 +556,8 @@ QuasiPolynomial mlir::presburger::detail::getCoefficientInRationalFunction(
556
556
// / v represents the affine functions whose floors are multiplied by the
557
557
// / generators, and ds represents the list of generators.
558
558
std::pair<QuasiPolynomial, std::vector<Fraction>>
559
- substituteMuInTerm (unsigned numParams, ParamPoint v, std::vector<Point> ds ,
560
- Point mu) {
559
+ substituteMuInTerm (unsigned numParams, const ParamPoint &v ,
560
+ const std::vector< Point> &ds, const Point & mu) {
561
561
unsigned numDims = mu.size ();
562
562
#ifndef NDEBUG
563
563
for (const Point &d : ds)
@@ -635,7 +635,7 @@ void normalizeDenominatorExponents(int &sign, QuasiPolynomial &num,
635
635
636
636
// / Compute the binomial coefficients nCi for 0 ≤ i ≤ r,
637
637
// / where n is a QuasiPolynomial.
638
- std::vector<QuasiPolynomial> getBinomialCoefficients (QuasiPolynomial n,
638
+ std::vector<QuasiPolynomial> getBinomialCoefficients (const QuasiPolynomial & n,
639
639
unsigned r) {
640
640
unsigned numParams = n.getNumInputs ();
641
641
std::vector<QuasiPolynomial> coefficients;
@@ -652,7 +652,8 @@ std::vector<QuasiPolynomial> getBinomialCoefficients(QuasiPolynomial n,
652
652
653
653
// / Compute the binomial coefficients nCi for 0 ≤ i ≤ r,
654
654
// / where n is a QuasiPolynomial.
655
- std::vector<Fraction> getBinomialCoefficients (Fraction n, Fraction r) {
655
+ std::vector<Fraction> getBinomialCoefficients (const Fraction &n,
656
+ const Fraction &r) {
656
657
std::vector<Fraction> coefficients;
657
658
coefficients.reserve ((int64_t )floor (r));
658
659
coefficients.emplace_back (1 );
0 commit comments