diff options
Diffstat (limited to 'doc/snippets/Tutorial_Map_rowmajor.cpp')
-rw-r--r-- | doc/snippets/Tutorial_Map_rowmajor.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/snippets/Tutorial_Map_rowmajor.cpp b/doc/snippets/Tutorial_Map_rowmajor.cpp new file mode 100644 index 000000000..fd45ace03 --- /dev/null +++ b/doc/snippets/Tutorial_Map_rowmajor.cpp @@ -0,0 +1,7 @@ +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; + |