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 @@
#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
{
/* 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
{
enum { Rows = traits<T>::RowsAtCompileTime,
Cols = traits<T>::ColsAtCompileTime,
MaxRows = traits<T>::MaxRowsAtCompileTime,
MaxCols = traits<T>::MaxColsAtCompileTime
};
typedef Matrix<typename traits<T>::Scalar,
Rows,
Cols,
(MaxCols==1&&MaxRows!=1) ? ColMajor : RowMajor,
MaxRows,
MaxCols
> type;
};
}
}
} // namespace fix
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 ::Eigen::Matrix<typename ::Eigen::internal::traits<T>::Scalar,
Rows,
Cols,
(MaxCols==1&&MaxRows!=1) ? ::Eigen::ColMajor : ::Eigen::RowMajor,
MaxRows,
MaxCols
> type;
};
} } } // 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