More aligned new operators

release/4.3a0
Frank Dellaert 2018-11-06 00:29:38 -05:00
parent 2584d421b8
commit c58a78b60a
6 changed files with 27 additions and 6 deletions

View File

@ -320,6 +320,9 @@ private:
boost::serialization::base_object<Base>(*this));
ar & BOOST_SERIALIZATION_NVP(_PIM_);
}
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};
// class CombinedImuFactor

View File

@ -59,8 +59,11 @@ struct GTSAM_EXPORT PreintegratedRotationParams {
ar & BOOST_SERIALIZATION_NVP(body_P_sensor);
}
#ifdef GTSAM_USE_QUATERNIONS
// Align if we are using Quaternions
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
#endif
};
/**
@ -169,8 +172,11 @@ class GTSAM_EXPORT PreintegratedRotation {
ar& BOOST_SERIALIZATION_NVP(delRdelBiasOmega_);
}
#ifdef GTSAM_USE_QUATERNIONS
// Align if we are using Quaternions
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
#endif
};
template <>

View File

@ -202,7 +202,8 @@ public:
/// @}
#endif
/// @}
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};
} /// namespace gtsam

View File

@ -75,8 +75,11 @@ protected:
ar & BOOST_SERIALIZATION_NVP(n_gravity);
}
#ifdef GTSAM_USE_QUATERNIONS
// Align if we are using Quaternions
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
#endif
};
} // namespace gtsam

View File

@ -205,6 +205,11 @@ private:
BOOST_SERIALIZATION_SPLIT_MEMBER()
friend class boost::serialization::access;
// Alignment, see https://eigen.tuxfamily.org/dox/group__TopicStructHavingEigenMembers.html
enum { NeedsToAlign = (sizeof(T) % 16) == 0 };
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
};
// ExpressionFactor

View File

@ -186,7 +186,10 @@ namespace gtsam {
ar & BOOST_SERIALIZATION_NVP(throwCheirality_);
ar & BOOST_SERIALIZATION_NVP(verboseCheirality_);
}
};
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};
/// traits
template<class POSE, class LANDMARK, class CALIBRATION>