pinocchio
2.6.3
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
eigen-macros.hpp
1
//
2
// Copyright (c) 2017-2018 CNRS
3
//
4
5
#ifndef __pinocchio_eigen_macros_hpp__
6
#define __pinocchio_eigen_macros_hpp__
7
8
#include "pinocchio/utils/eigen-fix.hpp"
9
11
#define PINOCCHIO_EIGEN_PLAIN_TYPE(D) Eigen::internal::plain_matrix_type< typename pinocchio::helper::argument_type<void(D)>::type >::type
12
#define PINOCCHIO_EIGEN_PLAIN_TYPE_NO_PARENS(D) Eigen::internal::plain_matrix_type< typename pinocchio::helper::argument_type<void D>::type >::type
13
15
#define PINOCCHIO_EIGEN_PLAIN_COLUMN_MAJOR_TYPE(D) pinocchio::helper::handle_return_type_without_typename<D,Eigen::internal::plain_matrix_type_column_major>::type
16
18
#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
19
21
#define PINOCCHIO_EIGEN_REF_CONST_TYPE(D) Eigen::internal::ref_selector<D>::type
22
#if EIGEN_VERSION_AT_LEAST(3,2,90)
23
#define PINOCCHIO_EIGEN_REF_TYPE(D) Eigen::internal::ref_selector<D>::non_const_type
24
#else
25
#define PINOCCHIO_EIGEN_REF_TYPE(D) \
26
Eigen::internal::conditional< \
27
bool(Eigen::internal::traits<D>::Flags & Eigen::NestByRefBit), \
28
D &, \
29
D \
30
>::type
31
#endif
32
34
#if EIGEN_VERSION_AT_LEAST(3,3,0)
35
#define PINOCCHIO_EIGEN_DOT_PRODUCT_RETURN_TYPE(D1,D2) \
36
Eigen::ScalarBinaryOpTraits< typename Eigen::internal::traits< D1 >::Scalar, typename Eigen::internal::traits< D2 >::Scalar >::ReturnType
37
#else
38
#define PINOCCHIO_EIGEN_DOT_PRODUCT_RETURN_TYPE(D1,D2) \
39
Eigen::internal::scalar_product_traits<typename Eigen::internal::traits< D1 >::Scalar,typename Eigen::internal::traits< D2 >::Scalar>::ReturnType
40
#endif
41
43
#define PINOCCHIO_EIGEN_CONST_CAST(TYPE,OBJ) const_cast<TYPE &>(OBJ.derived())
44
46
#if defined(PINOCCHIO_WITH_CXX11_SUPPORT) && EIGEN_VERSION_AT_LEAST(3,2,90)
47
#define PINOCCHIO_WITH_EIGEN_TENSOR_MODULE
48
#endif
49
50
#endif // ifndef __pinocchio_eigen_macros_hpp__
src
eigen-macros.hpp
Generated by
1.8.13