Verified Commit fbb21087 authored by Justin Carpentier's avatar Justin Carpentier Committed by Justin Carpentier
Browse files

[Eigen] Fix plain_matrix_type_row_major::type

This fix should be used until a PR in Eigen has been merged
parent 36650272
......@@ -50,7 +50,7 @@ namespace se3
#define EIGEN_PLAIN_COLUMN_MAJOR_TYPE(D) Eigen::internal::plain_matrix_type_column_major< typename se3::internal::argument_type<void(D)>::type >::type
/// \brief Similar to macro EIGEN_PLAIN_TYPE but with guaranty to provite a row major type
#define EIGEN_PLAIN_ROW_MAJOR_TYPE(D) Eigen::internal::plain_matrix_type_row_major< typename se3::internal::argument_type<void(D)>::type >::type
#define EIGEN_PLAIN_ROW_MAJOR_TYPE(D) Eigen::internal::fix::plain_matrix_type_row_major< typename se3::internal::argument_type<void(D)>::type >::type
/// \brief Macro giving access to the reference type of D
#define EIGEN_REF_CONSTTYPE(D) Eigen::internal::ref_selector<D>::type
......
......@@ -32,5 +32,32 @@ namespace se3
}
#endif
namespace Eigen
{
namespace internal
{
namespace fix
{
/* 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
#endif // ifndef __se3_utils_eigen_fix_hpp__
Supports Markdown
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