1 Matrix
<int, 3, 4, ColMajor
> Acolmajor
;
2 Acolmajor
<< 8, 2, 2, 9,
5 cout
<< "The matrix A:" << endl
;
6 cout
<< Acolmajor
<< endl
<< endl
;
8 cout
<< "In memory (column-major):" << endl
;
9 for (int i
= 0; i
< Acolmajor
.size(); i
++)
10 cout
<< *(Acolmajor
.data() + i
) << " ";
13 Matrix
<int, 3, 4, RowMajor
> Arowmajor
= Acolmajor
;
14 cout
<< "In memory (row-major):" << endl
;
15 for (int i
= 0; i
< Arowmajor
.size(); i
++)
16 cout
<< *(Arowmajor
.data() + i
) << " ";