[Mlir-commits] [mlir] [MLIR][Presburger] Implement computation of generating function for unimodular cones (PR #77235)

Arjun P llvmlistbot at llvm.org
Tue Jan 9 05:47:18 PST 2024


================
@@ -63,3 +64,79 @@ MPInt mlir::presburger::detail::getIndex(ConeV cone) {
 
   return cone.determinant();
 }
+
+/// Compute the generating function for a unimodular cone.
+/// This consists of a single term of the form
+/// x^num / prod_j (1 - x^den_j)
+///
+/// den_j is defined as the set of generators of the cone.
+/// num is computed by expressing the vertex as a weighted
+/// sum of the generators, and then taking the floor of the
+/// coefficients.
+GeneratingFunction mlir::presburger::detail::unimodularConeGeneratingFunction(
----------------
Superty wrote:

Document the function of sign here.

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


More information about the Mlir-commits mailing list