[Mlir-commits] [mlir] [MLIR][Presburger] Implement vertex enumeration and chamber decomposition for polytope generating function computation. (PR #78987)

Arjun P llvmlistbot at llvm.org
Tue Jan 30 09:07:47 PST 2024


================
@@ -29,6 +29,24 @@ Matrix<T>::Matrix(unsigned rows, unsigned columns, unsigned reservedRows,
   data.reserve(std::max(nRows, reservedRows) * nReservedColumns);
 }
 
+template <typename T>
+bool Matrix<T>::operator==(const Matrix<T> &m) const {
+  if (nRows != m.getNumRows())
+    return false;
+  if (nColumns != m.getNumColumns())
+    return false;
+
+  for (unsigned i = 0; i < nRows; i++) {
+    for (unsigned j = 0; j < nColumns; j++) {
+      if (at(i, j) == m.at(i, j))
----------------
Superty wrote:

if !=
  return false

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


More information about the Mlir-commits mailing list