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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jan 3 09:26:07 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.
----------------
Abhinav271828 wrote:

Would suggest the following rephrasings:
l. 234: // to their final position. When moving right (i.e.
l. 239: // are copied to their final positions, filling in the zeroes. Finally, the now redundant adjacent

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


More information about the Mlir-commits mailing list