libeigen/eigen!2509 Closes #2868 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
9 lines
387 B
C++
9 lines
387 B
C++
// SPDX-FileCopyrightText: The Eigen Authors
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
int array[8];
|
|
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;
|