[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


================
@@ -51,37 +52,40 @@ TEST(BarvinokTest, getIndex) {
 // (s.t. the cones are unimodular) and the generating functions
 // are computed. We check that the results contain the correct
 // matrices.
-TEST(BarvinokTest, unimodularConeGeneratingFunction) {
-  ConeH cone = defineHRep(2);
-  cone.addInequality({0, -1, 0});
-  cone.addInequality({-1, -2, 0});
-
-  ParamPoint vertex =
-      makeFracMatrix(2, 3, {{2, 2, 0}, {-1, -Fraction(1, 2), 1}});
-
-  GeneratingFunction gf = unimodularConeGeneratingFunction(vertex, 1, cone);
-
-  EXPECT_EQ_REPR_GENERATINGFUNCTION(
-      gf, GeneratingFunction(
-              2, {1},
-              {makeFracMatrix(3, 2, {{-1, 0}, {-Fraction(1, 2), 1}, {1, 2}})},
-              {{{2, -1}, {-1, 0}}}));
-
-  cone = defineHRep(3);
-  cone.addInequality({7, 1, 6, 0});
-  cone.addInequality({9, 1, 7, 0});
-  cone.addInequality({8, -1, 1, 0});
-
-  vertex = makeFracMatrix(3, 2, {{5, 2}, {6, 2}, {7, 1}});
-
-  gf = unimodularConeGeneratingFunction(vertex, 1, cone);
-
-  EXPECT_EQ_REPR_GENERATINGFUNCTION(
-      gf,
-      GeneratingFunction(
-          1, {1}, {makeFracMatrix(2, 3, {{-83, -100, -41}, {-22, -27, -15}})},
-          {{{8, 47, -17}, {-7, -41, 15}, {1, 5, -2}}}));
-}
+// TEST(BarvinokTest, unimodularConeGeneratingFunction) {
+//   ConeH cone = defineHRep(2);
+//   cone.addInequality({0, -1, 0});
+//   cone.addInequality({-1, -2, 0});
+//
+//   ParamPoint vertex =
+//       makeFracMatrix(2, 3, {{2, 2, 0}, {-1, -Fraction(1, 2), 1}});
+//
+//   GeneratingFunction gf =
+//       computeUnimodularConeGeneratingFunction(vertex, 1, cone);
+//
+//   EXPECT_EQ_REPR_GENERATINGFUNCTION(
+//       gf, GeneratingFunction(
+//               2, {1},
+//               {makeFracMatrix(3, 2, {{-1, 0}, {-Fraction(1, 2), 1}, {1,
+//               2}})},
+//               {{{2, -1}, {-1, 0}}}));
+//
+//   cone = defineHRep(3);
+//   cone.addInequality({7, 1, 6, 0});
+//   cone.addInequality({9, 1, 7, 0});
+//   cone.addInequality({8, -1, 1, 0});
+//
+//   vertex = makeFracMatrix(3, 2, {{5, 2}, {6, 2}, {7, 1}});
+//
+//   gf = computeUnimodularConeGeneratingFunction(vertex, 1, cone);
+//
+//   EXPECT_EQ_REPR_GENERATINGFUNCTION(
+//       gf,
+//       GeneratingFunction(
+//           1, {1}, {makeFracMatrix(2, 3, {{-83, -100, -41}, {-22, -27,
+//           -15}})},
+//           {{{8, 47, -17}, {-7, -41, 15}, {1, 5, -2}}}));
+// }
----------------
Superty wrote:

Is this intended?

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


More information about the Mlir-commits mailing list