[llvm] [MLIR][Presburger] Define matrix inverse for rational matrices (PR #67382)

Arjun P via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 08:39:48 PDT 2023


================
@@ -390,4 +390,68 @@ MPInt IntMatrix::normalizeRow(unsigned row, unsigned cols) {
 
 MPInt IntMatrix::normalizeRow(unsigned row) {
   return normalizeRow(row, getNumColumns());
+}
+
+FracMatrix FracMatrix::identity(unsigned dimension) {
+  FracMatrix matrix(dimension, dimension);
----------------
Superty wrote:

You can use Matrix<T>::identity in this implementation

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


More information about the llvm-commits mailing list