[Mlir-commits] [mlir] [MLIR][Presburger] Add LLL basis reduction (PR #75565)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Dec 16 11:48:15 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 7bc6c4abe8e8d8ab70e02e4c2025a94dda01d908 f2168db7a8e1b675194d3df6e6f44cfd6029201f -- mlir/include/mlir/Analysis/Presburger/Fraction.h mlir/include/mlir/Analysis/Presburger/Matrix.h mlir/lib/Analysis/Presburger/Matrix.cpp mlir/unittests/Analysis/Presburger/MatrixTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/unittests/Analysis/Presburger/MatrixTest.cpp b/mlir/unittests/Analysis/Presburger/MatrixTest.cpp
index fb6a1a3779..7e1b2009ae 100644
--- a/mlir/unittests/Analysis/Presburger/MatrixTest.cpp
+++ b/mlir/unittests/Analysis/Presburger/MatrixTest.cpp
@@ -381,26 +381,26 @@ TEST(MatrixTest, gramSchmidt) {
TEST(MatrixTest, LLL) {
- //void checkReducedBasis(FracMatrix mat, Fraction delta) {
- //FracMatrix gsOrth = mat.gramSchmidt();
+ // void checkReducedBasis(FracMatrix mat, Fraction delta) {
+ // FracMatrix gsOrth = mat.gramSchmidt();
//// Size-reduced check.
- //for (unsigned i = 0; i < 3; i++)
- // for (unsigned j = 0; j < i; j++) {
- // Fraction mu = dotProduct(mat.getRow(i), gsOrth.getRow(j)) /
- // dotProduct(gsOrth.getRow(j), gsOrth.getRow(j));
- // ASSERT_TRUE(abs(mu) <= Fraction(1, 2));
- // }
+ // for (unsigned i = 0; i < 3; i++)
+ // for (unsigned j = 0; j < i; j++) {
+ // Fraction mu = dotProduct(mat.getRow(i), gsOrth.getRow(j)) /
+ // dotProduct(gsOrth.getRow(j), gsOrth.getRow(j));
+ // ASSERT_TRUE(abs(mu) <= Fraction(1, 2));
+ // }
//// Lovasz condition check.
- //for (unsigned i = 1; i < 3; i++) {
- // Fraction mu = dotProduct(mat.getRow(i), gsOrth.getRow(i - 1)) /
- // dotProduct(gsOrth.getRow(i - 1), gsOrth.getRow(i - 1));
- // ASSERT_TRUE(dotProduct(mat.getRow(i), mat.getRow(i)) >
- // (delta - mu * mu) *
- // dotProduct(gsOrth.getRow(i - 1), gsOrth.getRow(i - 1)));
- //}
- //}
+ // for (unsigned i = 1; i < 3; i++) {
+ // Fraction mu = dotProduct(mat.getRow(i), gsOrth.getRow(i - 1)) /
+ // dotProduct(gsOrth.getRow(i - 1), gsOrth.getRow(i - 1));
+ // ASSERT_TRUE(dotProduct(mat.getRow(i), mat.getRow(i)) >
+ // (delta - mu * mu) *
+ // dotProduct(gsOrth.getRow(i - 1), gsOrth.getRow(i - 1)));
+ // }
+ // }
FracMatrix mat =
makeFracMatrix(3, 3,
``````````
</details>
https://github.com/llvm/llvm-project/pull/75565
More information about the Mlir-commits
mailing list