[Mlir-commits] [mlir] [MLIR][Presburger] Add support for Smith normal form (PR #185328)
Arjun Pitchanathan
llvmlistbot at llvm.org
Tue Mar 10 09:05:36 PDT 2026
================
@@ -258,6 +258,56 @@ TEST(MatrixTest, computeHermiteNormalForm) {
}
}
+static IntMatrix matmul(const IntMatrix &a, const IntMatrix &b) {
+ assert(a.getNumColumns() == b.getNumRows());
+ unsigned n = a.getNumRows();
+ unsigned m = b.getNumRows();
+ unsigned p = b.getNumColumns();
+ IntMatrix result(n, p);
+
+ for (unsigned i = 0; i < n; i++) {
+ for (unsigned j = 0; j < m; j++) {
+ for (unsigned k = 0; k < p; k++) {
+ result(i, k) += a(i, j) * b(j, k);
+ }
+ }
+ }
+ return result;
+}
----------------
superty wrote:
can you add this to either lineartransform or Matrix?
https://github.com/llvm/llvm-project/pull/185328
More information about the Mlir-commits
mailing list