Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SkelParser.cpp eigen issues #413

Closed
jturner65 opened this issue Jun 17, 2015 · 9 comments
Closed

SkelParser.cpp eigen issues #413

jturner65 opened this issue Jun 17, 2015 · 9 comments

Comments

@jturner65
Copy link

The new SkelParser.h file defines 2 stl containers (specifically maps) of structures containing vectorizable Eigen constructs (as does SdfParser.h on lines 77,78). as per this page :

http://eigen.tuxfamily.org/dox/group__TopicStlContainers.html

these maps need to specify alignment allocators.

furthermore, in Joint.h : struct Properties requires EIGEN_MAKE_ALIGNED_OPERATOR_NEW (I'm pretty sure an Isometry3d is vectorizable and so subject to this requirement)

Edit: here's something that is being done in the MRPT to address this kind of thing :
http://reference.mrpt.org/svn/aligned__containers_8h_source.html
note, this problem is with stl containers of Eigen vectorizable constructs, or -> structs containing them <-, the latter of which is the issue here, i think.

@jturner65
Copy link
Author

Also, i am having an issue with the "return std::make_shared<...>" code. I have found that boost::make_shared will not work with objects requiring alignment, and i think that's the issue here as well. see this thread :

https://forum.kde.org/viewtopic.php?f=74&t=97936

specifically this :
"you need to pass this allocator:
Eigen::aligned_allocator<Foo_d>
to allocate_shared(...); "

Edit : more on this :
http://eigen.tuxfamily.org/bz/show_bug.cgi?id=795

@mxgrey
Copy link
Member

mxgrey commented Jun 17, 2015

Just out of curiosity, @jturner65 , what platform are you getting these issues on?

We were negligent about explicitly dealing with Eigen's alignment problems, because we thought this was resolved with C++11, but it seems that not all platforms support that part of the standard yet. It looks like Windows is one such culprit.

@mkoval
Copy link
Collaborator

mkoval commented Jun 17, 2015

@mxgrey I've also seen many more alignment issues on x86 than x86_64.

@jturner65 Are you running 32-bit or 64-bit Windows?

@jturner65
Copy link
Author

i am on windows 7 64, using visual studio 2013 32-bit.

with regard to the alignment issues, i wouldn't think any standard adherence would help this since, as i understand it, Eigen's alignment requirements are related to SIMD optimisations.

@mxgrey
Copy link
Member

mxgrey commented Jun 17, 2015

We haven't been experiencing any alignment-related issues with GCC and Clang, which both have the C++11 alignment support that VS2013 only has "partial" support for.

You can see on this page that according to the Eigen developers, the alignment issues are resolved in C++11:

No, it's not our bug. It's more like an inherent problem of the C++98 language specification, and seems to be taken care of in the upcoming language revision: see this document.

@jturner65
Copy link
Author

cool, thanks for the link - it's good to know that at least some compilers don't have this issue.

@mxgrey
Copy link
Member

mxgrey commented Jun 17, 2015

Hopefully once Microsoft catches up, the whole issue can be a thing of the past. We thought it already was, but I guess we need to get some active Windows developers on the team.

@jturner65
Copy link
Author

i'd love to help :- ) i've been living in dart for a couple years now. i'll help out any way i can.

@jturner65
Copy link
Author

fixed with #414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants