[Mlir-commits] [mlir] [MLIR][Presburger] Implement Matrix::moveColumns (PR #68362)

Bharathi Ramana Joshi llvmlistbot at llvm.org
Wed Jan 3 09:32:59 PST 2024


================
@@ -230,6 +230,47 @@ void Matrix<T>::fillRow(unsigned row, const T &value) {
     at(row, col) = value;
 }
 
+// moveColumns is implemented by moving the columns adjacent to the source range
+// [srcPos, srcPos + num) to their final position. When moving right (i.e.
+// dstPos > srcPos), the range of the adjacent columns is [srcPos + num,
+// dstPos + num). When moving left (i.e. dstPos < srcPos) the range of the
+// adjacent columns is [dstPos, srcPos). First, zeroed out columns are inserted
+// in the final positions of the adjacent columns. Then, the zeroed out columns
+// are swapped with the adjacent columns. Finally, the now redundant adjacent
+// columns are deleted.
----------------
iambrj wrote:

(it's the same as what I wrote)

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


More information about the Mlir-commits mailing list