Registered Member
|
Hi Everyone,
I´ve got the following code which gives me the infamous "Unaligned Array" assert in line 3, when trying to add the transformation to the map.
incMap ist just a std:map:
and model´s getTransformation just returns some Eigen::Transformation3f :
So it looks like when inserting the Eigen::Transform3f into the map, Operator new is not used, and thus I get the alignment assert. Is there a workaround for this, or am I misunderstanding something? regards, Stefan
Last edited by stefanTUD on Fri Jan 09, 2009 7:30 pm, edited 1 time in total.
|
Registered Member
|
Svn up and retry please
Probably std::map calls a placement new and until beta5 included this wasn't getting overloaded for Transform. The latest code uses a unique macro EIGEN_MAKE_ALIGNED_OPERATOR_NEW that overloads the placement new as well. So it should fix your issue.
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
|
Ok, maybe I should´ve been more specific about my configuration:
I´m using VS2005 and the Eigen2 directly via latest svn. I still have the problem though : |
Registered Member
|
quick update from IRC until we finish solving this issue...
the problem is that a custom allocator must be used with this map. ei_new_allocator does that but then it has issues of its own.
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 just committed "aligned_allocator" which should allow you to store aligned types in a std::map. There is still sometimes a compile-time issue with other STL containers that have a standard-conformant resize() method that passes by value, but I believe this should fix the original issue with std::map like so: std::map, aligned_allocator > matrixMap; |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell