[Mlir-commits] [mlir] [MLIR][Presburger] Add LLL basis reduction (PR #75565)

Arjun P llvmlistbot at llvm.org
Fri Dec 15 09:08:11 PST 2023


================
@@ -576,4 +576,39 @@ FracMatrix FracMatrix::gramSchmidt() const {
     }
   }
   return orth;
-}
\ No newline at end of file
+}
+
+void FracMatrix::LLL(Fraction delta) {
+  MPInt nearest;
+  Fraction mu;
+
+  // `bStar` holds the Gram-Schmidt orthogonalisation
+  // of the matrix at all times. It is recomputed every
+  // time the matrix is modified during the algorithm.
+  FracMatrix bStar = gramSchmidt();
----------------
Superty wrote:

`gsOrth` is better

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


More information about the Mlir-commits mailing list