[Mlir-commits] [mlir] [MLIR][Presburger] Add support for Smith normal form (PR #185328)
Arjun Pitchanathan
llvmlistbot at llvm.org
Mon Mar 16 06:45:50 PDT 2026
================
@@ -535,6 +553,151 @@ std::pair<IntMatrix, IntMatrix> IntMatrix::computeHermiteNormalForm() const {
return {h, u};
}
+// In the submatrix `mat(from:, from:)`, the function finds the position (row,
+// col) of the element with smallest non-zero absolute value. When all elements
+// in the submatrix are zero, returns std::nullopt.
+static std::optional<std::pair<unsigned, unsigned>>
+nonZeroMinInSubmatrix(const IntMatrix &mat, unsigned from) {
----------------
superty wrote:
nit: functoin names should have verbs, e.g. findMinNonZeroInMatrix
https://github.com/llvm/llvm-project/pull/185328
More information about the Mlir-commits
mailing list