[Mlir-commits] [mlir] [MLIR][Presburger] Implement function to evaluate the number of terms in a generating function. (PR #78078)

Arjun P llvmlistbot at llvm.org
Sun Jan 14 11:56:45 PST 2024


================
@@ -245,3 +245,253 @@ QuasiPolynomial mlir::presburger::detail::getCoefficientInRationalFunction(
   }
   return coefficients[power].simplify();
 }
+
+static std::vector<Fraction> convolution(std::vector<Fraction> a,
+                                         std::vector<Fraction> b) {
+  // The length of the convolution is the maximum of the lengths
+  // of the two sequences. We pad the shorter one with zeroes.
+  unsigned convlen = std::max(a.size(), b.size());
----------------
Superty wrote:

convLen or just len is fine

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


More information about the Mlir-commits mailing list