Re: [eigen] Eigen containers cannot be vectorized

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


Hi,

Restrict is actually supported in one way or another by all major C++ compiler. So using it makes sense as lots of other scientific applications are using it (and Intel suggests to use it even in C++ code).

Cheers,

2016-12-08 13:44 GMT+00:00 Francois Fayard <fayard@xxxxxxxxxxxxx>:

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




--
Information System Engineer, Ph.D.
Blog: http://blog.audio-tk.com/
LinkedIn: http://www.linkedin.com/in/matthieubrucher


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