Registered Member
|
I've come across the problem that I've made some templates that are meant to be used independently from eigen (i.e. cannot depend on eigen) that are none-the-less in need of eigen alignment when used with eigen types to conform to stated eigen alignment rules.
Is there any known solution to this? In some cases I can change some of the data members to references to avoid the problem, but others probably not. |
Moderator
|
you can use types that does not require alignment, like:
Eigen::Matrix<double,4,1,Eigen::DontAlign> instead of Eigen::Vector4d... The downside is that you lost vectorization for these precise objects. |
Registered Member
|
Do they play well with types are aligned? For instance, can I do the following safely?:
Eigen::Matrix<double,4,1,Eigen::DontAlign> foo; Eigen::Matrix<double,4,1> bar; foo.dot( bar ); |
Moderator
|
sure, they are fully compatible.
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]