Re: [eigen] Eigen containers cannot be vectorized

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]



Isn't that something where one would rather use (non-standard) __restrict__?

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.

François Fayard
Founder & Consultant - Inside Loop
Applied Mathematics & High Performance Computing
Tel: +33 (0)6 01 44 06 93
Web: www.insideloop.io



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/