Registered Member
|
Hi.
I'm an Eigen newbie using Eigen to handle some 3d transforms in an OpenGL application I writing. I'm using Visual Studio 2010, and have had lots of problems with the dreaded misaligned array assert. I can fix class member alignment with #pragma pack() (or the constructor macro), but as far as I can tell there is no way to correct or enforce stack alignment. Without that, simple things like 'Quaternion<float>::Identity()' will assert because the stack-allocated array is misaligned. In the end I gave up and disabled vectorization. But I'm curious to know if I'm missing something, and whether it IS possible to enable vectorisation under this platform? Thanks in advance. Ross. |
Registered Member
|
Have you read the page linked to from the assertion message?
http://eigen.tuxfamily.org/dox/TopicUna ... ssert.html
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
|
Yep. And I understand the issue. What I perhaps missed was the scope of the
problem. I didn't realise that there was no way to guarantee stack alignment of objects in C++. This means you have to avoid all static methods that return objects (I know - effectively passing by value). In my case Quaternion::Identity(). Maybe the web-page could mention that someplace to help us newbs? Thanks. Ross. |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora