Registered Member
|
I'm getting this assert which sends me to this site http://eigen.tuxfamily.org/dox/Unaligne ... ssert.html
I'm using Eigen 2.0. I tried to find the case that was similar to mine but there was not one exactly like it that I could see. I found it to be asserting on
Where mModelList is:
and Model is a class with code like follows:
The code only started asseting when I added the Matrix4f into model. If anyone knows how to fix this alignment issue it'll be much help. |
Registered Member
|
This is a tough one, because the culprit is the libstdc++98 design. certain std containers have a resize method that takes an optional value_type by value instead of taking it by reference, causing it to be copied on the stack losing alignment properties. This is getting fixed in c++0x.
In Eigen 2.0, we only provide a work-around for std::vector. In Eigen 3, we also provide a work-around for std::list and std::deque: just do #include <Eigen/StdList> and make sure to use Eigen::aligned_allocator as your allocator for std::list, which will select our partial template specialization with the fix. So either move to Eigen 3 or borrow the Eigen/StdList file from it (you may have to tweak it to work with Eigen 2)
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
|
Thanks bjacob, that fixed that problem. I upgraded to Eigen 3, placed in that header file, and declared my list as.
I'm getting the same problem on my std::hash_map. Error occurs here:
So I changed the declaration of hashMeshPool to the following:
I'm not too familar with this std::less but it just seems like you give it a class with comparision function. Is there such thing as std::less<std::string> or do I have to create my own comparision class to give less? I'm getting a few errors like
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient