Registered Member
|
It wasn't listed in the docs on aligned_allocator, but if you use std::vector with a class that has Eigen matrices as components, then you have to use the aligned_allocator argument. It's a bit of a mess to always have to do this for iterators etc. This issue only arises (for me) on 32-bit Linux; 64-bit appears ok.
Cheers --Kurt |
Registered Member
|
Have you read this?
http://eigen.tuxfamily.org/dox/StlContainers.html It is linked to from there: http://eigen.tuxfamily.org/dox/Unaligne ... ssert.html Do you think it should also be linked to from another place? You mention the documentation of aligned_allocator, but this is yet much more 'hidden'...
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
I was referring to http://eigen.tuxfamily.org/dox/StlContainers.html. If you read this, it says that you must use aligned_allocator when using std::vector (the new version) and other containers: fine. But it neglects to mention that you also need to do this if you use std::vector or another container with your own *class* which has as a member one of the Eigen Matrix fixed-size classes. This is in addition to adding EIGEN_MAKE_ALIGNED_OPERATOR_NEW to the class itself.
It would be nice to make it clear that classes containing fixed-size Eigen matrices as members are subject to the same container rules. Cheers --Kurt |
Registered Member
|
Oh! I understand. Yes, good idea, I'll make this change ASAP. Thanks!
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
I have updated the docs, in both branches. The online docs will be updated next week.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]