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

Arjun P llvmlistbot at llvm.org
Tue Nov 21 14:42:12 PST 2023


================
@@ -548,4 +548,27 @@ Fraction FracMatrix::determinant(FracMatrix *inverse) const {
     determinant *= m.at(i, i);
 
   return determinant;
+}
+
+FracMatrix FracMatrix::gramSchmidt() const {
+  bool linIndep =
+      (nRows < nColumns) || (nRows == nColumns && determinant() != 0);
+  assert(linIndep && "the vectors must be linearly independent!");
----------------
Superty wrote:

less vectors than the dimension does not imply linear independence.

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


More information about the Mlir-commits mailing list