[Mlir-commits] [mlir] [MLIR][Presburger] Add Gram-Schmidt (PR #70843)

Arjun P llvmlistbot at llvm.org
Tue Oct 31 11:17:10 PDT 2023


================
@@ -548,4 +548,27 @@ Fraction FracMatrix::determinant(FracMatrix *inverse) const {
     determinant *= m.at(i, i);
 
   return determinant;
+}
+
+FracMatrix FracMatrix::gramSchmidt() const {
+
+    // Create a copy of the argument to store
+    // the orthogonalised version.
+    FracMatrix orth(*this);
+    Fraction projectionScale;
----------------
Superty wrote:

you can declare this below where you construct it. fractions are cheap to construct

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


More information about the Mlir-commits mailing list