2012-02-09 05:11:12 +08:00
|
|
|
int array[8];
|
2023-12-06 05:22:55 +08:00
|
|
|
for (int i = 0; i < 8; ++i) array[i] = i;
|
|
|
|
|
cout << "Column-major:\n" << Map<Matrix<int, 2, 4> >(array) << endl;
|
|
|
|
|
cout << "Row-major:\n" << Map<Matrix<int, 2, 4, RowMajor> >(array) << endl;
|
|
|
|
|
cout << "Row-major using stride:\n" << Map<Matrix<int, 2, 4>, Unaligned, Stride<1, 4> >(array) << endl;
|