[clang] [Matrix] Add a row\col major toggle in the clang driver (PR #167628)

Florian Hahn via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 21 06:14:34 PST 2025


================
@@ -1073,6 +1073,11 @@ The matrix type extension supports explicit casts. Implicit type conversion betw
     i = static_cast<matrix_5_5<int>>(d);
   }
 
+The matrix type extension will support column and row major layouts. The flag
+to change this behavior is `-fmatrix-memory-layout` used like so
+`-fmatrix-memory-layout=column-major` for column major and like so
+`-fmatrix-memory-layout=row-major` for row major.
----------------
fhahn wrote:

```suggestion
The layout defaults to column major and can be specified using `-fmatrix-memory-layout`. To enable column major layout, use `-fmatrix-memory-layout=column-major`, and for row major layout use `-fmatrix-memory-layout=row-major`
```

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


More information about the cfe-commits mailing list