From 1aa36b2ea9f60848d4d25d7d2517d5d36b5d2c6e Mon Sep 17 00:00:00 2001 From: chrisbeall Date: Mon, 21 Jan 2019 23:27:58 -0800 Subject: [PATCH] Fix testPose2 failure by forcing eval in wedge expression. Always align Pose2. --- gtsam/geometry/Pose2.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gtsam/geometry/Pose2.h b/gtsam/geometry/Pose2.h index 079c649f3..603c3a421 100644 --- a/gtsam/geometry/Pose2.h +++ b/gtsam/geometry/Pose2.h @@ -295,17 +295,16 @@ private: ar & BOOST_SERIALIZATION_NVP(r_); } -#ifdef GTSAM_TYPEDEF_POINTS_TO_VECTORS public: - // Make sure Pose2 is aligned if it contains a Vector2 + // Align for Point2, which is either derived from, or is typedef, of Vector2 EIGEN_MAKE_ALIGNED_OPERATOR_NEW -#endif }; // Pose2 /** specialization for pose2 wedge function (generic template in Lie.h) */ template <> inline Matrix wedge(const Vector& xi) { - return Pose2::wedge(xi(0),xi(1),xi(2)); + // NOTE(chris): Need eval() as workaround for Apple clang + avx2. + return Matrix(Pose2::wedge(xi(0),xi(1),xi(2))).eval(); } /**