================
@@ -141,6 +141,22 @@ class MatrixBuilder {
return B.CreateCall(TheFn->getFunctionType(), TheFn, Ops, Name);
}
+ /// Create a column-major matrix from a row-major matrix with the given
+ /// logical dimensions by transposing it.
+ CallInst *CreateRowMajorToColumnMajorTransform(Value *Matrix, unsigned Rows,
+ unsigned Columns,
+ const Twine &Name = "") {
+ return CreateMatrixTranspose(Matrix, Columns, Rows, Name);
+ }
+
+ /// Create a row-major matrix from a column-major matrix with the given
+ /// logical dimensions by transposing it.
+ CallInst *CreateColumnMajorToRowMajorTransform(Value *Matrix, unsigned Rows,
+ unsigned Columns,
+ const Twine &Name = "") {
+ return CreateMatrixTranspose(Matrix, Rows, Columns, Name);
----------------
bob80905 wrote:
Ok, I think it makes sense.
Might be worth adding some asserts or comments here, it wasn't immediately
intuitive to me.
https://github.com/llvm/llvm-project/pull/186898
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits