Verified Commit c4021755 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: fix compatibility with Eigen >= 3.3.9

parent a1c41943
Pipeline #12348 passed with stage
in 155 minutes and 50 seconds
......@@ -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
/// \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
#define PINOCCHIO_EIGEN_REF_CONST_TYPE(D) Eigen::internal::ref_selector<D>::type
......
......@@ -19,32 +19,31 @@ namespace pinocchio
}
#endif
namespace Eigen
namespace pinocchio
{
namespace internal
{
namespace fix
{
namespace fix { namespace Eigen { namespace internal {
/* 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,
Cols = traits<T>::ColsAtCompileTime,
MaxRows = traits<T>::MaxRowsAtCompileTime,
MaxCols = traits<T>::MaxColsAtCompileTime
enum { Rows = ::Eigen::internal::traits<T>::RowsAtCompileTime,
Cols = ::Eigen::internal::traits<T>::ColsAtCompileTime,
MaxRows = ::Eigen::internal::traits<T>::MaxRowsAtCompileTime,
MaxCols = ::Eigen::internal::traits<T>::MaxColsAtCompileTime
};
typedef Matrix<typename traits<T>::Scalar,
typedef ::Eigen::Matrix<typename ::Eigen::internal::traits<T>::Scalar,
Rows,
Cols,
(MaxCols==1&&MaxRows!=1) ? ColMajor : RowMajor,
(MaxCols==1&&MaxRows!=1) ? ::Eigen::ColMajor : ::Eigen::RowMajor,
MaxRows,
MaxCols
> type;
};
}
}
} // namespace fix
} } } // namespace fix::Eigen::internal
} // namespace pinocchio
#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