-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix failed unit tests on 32-bit machine #368
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. I have one suggestion though.
@@ -79,6 +79,9 @@ class SE2BoxConstraint : public constraint::Projectable, | |||
|
|||
// DOF of the joint | |||
std::size_t mDimension; | |||
|
|||
public: | |||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this for this class because none of the member variables is the vectorizable Eigen object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It uses Eigen::Vector3d
in defining mLowerLimits
and mUpperLimits
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, fixed-size of odd dimension is not a vectorizable Eigen object. 😈 If you look at the link, all the vectors are of even dimensions. Affine3d
(3x4 or 4x4; I don't remember what was it among them though.) is actually even dimension.
Codecov Report
@@ Coverage Diff @@
## master #368 +/- ##
==========================================
- Coverage 83.41% 83.37% -0.04%
==========================================
Files 197 197
Lines 5614 5619 +5
==========================================
+ Hits 4683 4685 +2
- Misses 931 934 +3
|
This PR fixes the failed unit tests on 32-bit machine,
which include (1) precision difference #220 ; and (2) Eigen alignment #365 .
In fixing the Eigen alignment issues, the updates include
(1) add
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
macros in structures having fixed-size Eigen members;https://eigen.tuxfamily.org/dox/group__TopicStructHavingEigenMembers.html
(2) add aligned allocator when using STL containers with fixed-size Eigen members.;
https://eigen.tuxfamily.org/dox/group__TopicStlContainers.html
(3) Replacing
std::make_shared
withdart::common::make_aligned_shared
for aligned structures.Document new methods and classes (N/A)
Format code with
make format
Set version target by selecting a milestone on the right side
Summarize this change in
CHANGELOG.md
Add unit test(s) for this change (N/A)