[Mlir-commits] [mlir] [MLIR][Presburger] Helper functions to compute the constant term of a generating function (PR #77819)

Arjun P llvmlistbot at llvm.org
Sat Jan 13 04:59:14 PST 2024


================
@@ -113,3 +119,12 @@ QuasiPolynomial QuasiPolynomial::simplify() {
   }
   return QuasiPolynomial(getNumInputs(), newCoeffs, newAffine);
 }
+
+Fraction QuasiPolynomial::getConstantTerm() {
+  Fraction t = 0;
+  for (unsigned i = 0, e = coefficients.size(); i < e; ++i) {
----------------
Superty wrote:

You can skip the braces

https://github.com/llvm/llvm-project/pull/77819


More information about the Mlir-commits mailing list