|Re: [eigen] Eigen containers cannot be vectorized|
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
It is indeed an aliasing problem. But the restrict keyword won’t help here. It has been designed for C, not for C++. There is some discussion on integrating a “restrict" keyword in C++ that works well with struct, but it is not there yet (not even in C++17).
Storing the size of the matrix as a pointer is the best way I know on doing it. For instance, compilers can vectorize std::vector because they do not store their size as an integer, but as a pointer.
Founder & Consultant - Inside Loop
Applied Mathematics & High Performance Computing
Tel: +33 (0)6 01 44 06 93
|Mail converted by MHonArc 2.6.19+||http://listengine.tuxfamily.org/|