epfl-archive/cs440-acg/ext/eigen/doc/snippets/Map_inner_stride.cpp

6 lines
199 B
C++
Raw Normal View History

2022-04-07 18:46:57 +02:00
int array[12];
for(int i = 0; i < 12; ++i) array[i] = i;
cout << Map<VectorXi, 0, InnerStride<2> >
(array, 6) // the inner stride has already been passed as template parameter
<< endl;