Unverified Commit 37e685a6 authored by Justin Carpentier's avatar Justin Carpentier Committed by GitHub
Browse files

Merge pull request #1346 from jcarpent/topic/eigen

Fix compatibility with Eigen >= 3.3.9 (not yet released)
parents a1c41943 c4021755
Pipeline #12361 passed with stage
in 232 minutes and 2 seconds
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#define PINOCCHIO_EIGEN_PLAIN_COLUMN_MAJOR_TYPE(D) pinocchio::helper::handle_return_type_without_typename<D,Eigen::internal::plain_matrix_type_column_major>::type #define PINOCCHIO_EIGEN_PLAIN_COLUMN_MAJOR_TYPE(D) pinocchio::helper::handle_return_type_without_typename<D,Eigen::internal::plain_matrix_type_column_major>::type
/// \brief Similar to macro PINOCCHIO_EIGEN_PLAIN_TYPE but with guaranty to provite a row major type /// \brief Similar to macro PINOCCHIO_EIGEN_PLAIN_TYPE but with guaranty to provite a row major type
#define PINOCCHIO_EIGEN_PLAIN_ROW_MAJOR_TYPE(D) pinocchio::helper::handle_return_type_without_typename<D,Eigen::internal::fix::plain_matrix_type_row_major>::type #define PINOCCHIO_EIGEN_PLAIN_ROW_MAJOR_TYPE(D) pinocchio::helper::handle_return_type_without_typename<D,::pinocchio::fix::Eigen::internal::plain_matrix_type_row_major>::type
/// \brief Macro giving access to the reference type of D /// \brief Macro giving access to the reference type of D
#define PINOCCHIO_EIGEN_REF_CONST_TYPE(D) Eigen::internal::ref_selector<D>::type #define PINOCCHIO_EIGEN_REF_CONST_TYPE(D) Eigen::internal::ref_selector<D>::type
......
...@@ -19,32 +19,31 @@ namespace pinocchio ...@@ -19,32 +19,31 @@ namespace pinocchio
} }
#endif #endif
namespace Eigen namespace pinocchio
{ {
namespace internal namespace fix { namespace Eigen { namespace internal {
{
namespace fix
{
/* plain_matrix_type_row_major : same as plain_matrix_type but guaranteed to be row-major /* plain_matrix_type_row_major : same as plain_matrix_type but guaranteed to be row-major
*/ */
template<typename T> struct plain_matrix_type_row_major template<typename T>
struct plain_matrix_type_row_major
{ {
enum { Rows = traits<T>::RowsAtCompileTime, enum { Rows = ::Eigen::internal::traits<T>::RowsAtCompileTime,
Cols = traits<T>::ColsAtCompileTime, Cols = ::Eigen::internal::traits<T>::ColsAtCompileTime,
MaxRows = traits<T>::MaxRowsAtCompileTime, MaxRows = ::Eigen::internal::traits<T>::MaxRowsAtCompileTime,
MaxCols = traits<T>::MaxColsAtCompileTime MaxCols = ::Eigen::internal::traits<T>::MaxColsAtCompileTime
}; };
typedef Matrix<typename traits<T>::Scalar, typedef ::Eigen::Matrix<typename ::Eigen::internal::traits<T>::Scalar,
Rows, Rows,
Cols, Cols,
(MaxCols==1&&MaxRows!=1) ? ColMajor : RowMajor, (MaxCols==1&&MaxRows!=1) ? ::Eigen::ColMajor : ::Eigen::RowMajor,
MaxRows, MaxRows,
MaxCols MaxCols
> type; > type;
}; };
}
} } } } // namespace fix::Eigen::internal
} // namespace fix } // namespace pinocchio
#endif // ifndef __pinocchio_utils_eigen_fix_hpp__ #endif // ifndef __pinocchio_utils_eigen_fix_hpp__
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment