[Mlir-commits] [mlir] [MLIR][Presburger] Implement vertex enumeration and chamber decomposition for polytope generating function computation. (PR #78987)

Arjun P llvmlistbot at llvm.org
Mon Jan 29 11:33:28 PST 2024


================
@@ -81,8 +85,35 @@ ConeH getDual(ConeV cone);
 
 /// Compute the generating function for a unimodular cone.
 /// The input cone must be unimodular; it assert-fails otherwise.
-GeneratingFunction unimodularConeGeneratingFunction(ParamPoint vertex, int sign,
-                                                    ConeH cone);
+GeneratingFunction computeUnimodularConeGeneratingFunction(ParamPoint vertex,
+                                                           int sign,
+                                                           ConeH cone);
+
+/// Find the solution of a set of equations that express affine constraints
+/// between a set of variables and a set of parameters. The solution expresses
+/// each variable as an affine function of the parameters.
+/// If there is no solution, return null.
+std::optional<ParamPoint> solveParametricEquations(FracMatrix equations);
+
+/// Given a list of possibly intersecting regions (PresburgerSet) and
+/// the vertices active in each region, produce a pairwise disjoint list of
+/// regions (chambers) and identify the vertices active in each of these new
+/// regions.
+/// In the return type, the vertices are stored by their index in the
+/// `vertices` argument, i.e., the set {2, 3, 4} represents the vertex set
+/// {vertices[2], vertices[3], vertices[4]}.
+/// The ith relation corresponds to the activity region of the ith vertex set.
+/// Note that here, by disjoint, we mean that the intersection is not
+/// full-dimensional.
----------------
Superty wrote:

I don't know what activity region means while reading this. Can you write this documentation assuming only basic math/CS background. e.g.

Given a list of pairs of presburger sets and generating functions, where the set represents the region where the GF is "active", this function returns another list of the same type. The returned list partitions the universe into parts depending on which subset of GFs is active there,  and gives the sum of active GFs for each part. Lower-dimensional parts are ....

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


More information about the Mlir-commits mailing list