pinocchio  2.5.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
eigen-fix.hpp
1 //
2 // Copyright (c) 2017-2018 CNRS
3 //
4 
5 #ifndef __pinocchio_utils_eigen_fix_hpp__
6 #define __pinocchio_utils_eigen_fix_hpp__
7 
8 #if EIGEN_VERSION_AT_LEAST(3,2,90) && !EIGEN_VERSION_AT_LEAST(3,3,0)
9 namespace pinocchio
10 {
11  namespace internal
12  {
14  template<typename XprType> struct size_of_xpr_at_compile_time
15  {
16  enum { ret = Eigen::internal::size_at_compile_time<Eigen::internal::traits<XprType>::RowsAtCompileTime,Eigen::internal::traits<XprType>::ColsAtCompileTime>::ret };
17  };
18  }
19 }
20 #endif
21 
22 namespace Eigen
23 {
24  namespace internal
25  {
26  namespace fix
27  {
28  /* plain_matrix_type_row_major : same as plain_matrix_type but guaranteed to be row-major
29  */
30  template<typename T> struct plain_matrix_type_row_major
31  {
32  enum { Rows = traits<T>::RowsAtCompileTime,
33  Cols = traits<T>::ColsAtCompileTime,
34  MaxRows = traits<T>::MaxRowsAtCompileTime,
35  MaxCols = traits<T>::MaxColsAtCompileTime
36  };
37  typedef Matrix<typename traits<T>::Scalar,
38  Rows,
39  Cols,
40  (MaxCols==1&&MaxRows!=1) ? ColMajor : RowMajor,
41  MaxRows,
42  MaxCols
43  > type;
44  };
45  }
46  }
47 } // namespace fix
48 
49 #endif // ifndef __pinocchio_utils_eigen_fix_hpp__
50 
Definition: casadi.hpp:49
Main pinocchio namespace.
Definition: treeview.dox:24