Discussion:
[eigen] alignment c++17
Sylvain Pointeau
2018-01-08 22:53:13 UTC
Permalink
Hi,

Happy new year and best wishes to everybody !

I just took back my old project (C++11) and moved it to C++17.

I understood that C++17 solved the issue with the alignment, am I correct?

Does it mean that:

- I don't need EIGEN_MAKE_ALIGNED_OPERATOR_NEW anymore
- I don't need to use template<class T> using aligned_vector = std::
vector<T,Eigen::aligned_allocator<T>> but vector<T> will be aligned by
default
- eigen objects can be passed by copy to functions, not only by
reference ?


Best regards,
Sylvain
Gael Guennebaud
2018-01-12 21:58:27 UTC
Permalink
Hi Sylvain,

I still haven't tried this new feature, but in theory I ended up with the
same conclusion modulo some adjustments in Eigen code to properly tells the
compiler about alignment requirements through the C++ standard. If you've
tried and got successful runs without any adjustment, please let us know!

gael


On Mon, Jan 8, 2018 at 11:53 PM, Sylvain Pointeau <
Post by Sylvain Pointeau
Hi,
Happy new year and best wishes to everybody !
I just took back my old project (C++11) and moved it to C++17.
I understood that C++17 solved the issue with the alignment, am I correct?
- I don't need EIGEN_MAKE_ALIGNED_OPERATOR_NEW anymore
vector<T,Eigen::aligned_allocator<T>> but vector<T> will be aligned by
default
- eigen objects can be passed by copy to functions, not only by
reference ?
Best regards,
Sylvain
Continue reading on narkive:
Loading...