Skip to content
Snippets Groups Projects
Verified Commit cad37c2e authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: add PINOCCHIO_WITH_EIGEN_TENSOR_MODULE

Related to #987
parent 9128f8a8
Branches
Tags
No related merge requests found
......@@ -41,4 +41,9 @@ Eigen::internal::scalar_product_traits<typename Eigen::internal::traits< D1 >::S
/// \brief Macro for an automatic const_cast
#define PINOCCHIO_EIGEN_CONST_CAST(TYPE,OBJ) const_cast<TYPE &>(OBJ.derived())
/// \brief Tell if Pinocchio should use the Eigen Tensor Module or not
#if defined(PINOCCHIO_WITH_CXX11_SUPPORT) && EIGEN_VERSION_AT_LEAST(3,2,90)
#define PINOCCHIO_WITH_EIGEN_TENSOR_MODULE
#endif
#endif // ifndef __pinocchio_eigen_macros_hpp__
......@@ -7,7 +7,7 @@
#include "pinocchio/fwd.hpp"
#ifdef PINOCCHIO_WITH_CXX11_SUPPORT
#ifdef PINOCCHIO_WITH_EIGEN_TENSOR_MODULE
#include <unsupported/Eigen/CXX11/Tensor>
#endif
......@@ -18,7 +18,7 @@
namespace pinocchio
{
#ifndef PINOCCHIO_WITH_CXX11_SUPPORT
#ifndef PINOCCHIO_WITH_EIGEN_TENSOR_MODULE
// Mimic the Eigen::Tensor module only available for C++11 and more
template<typename Scalar_, int NumIndices_, int Options_ = 0, typename IndexType = Eigen::DenseIndex>
......@@ -175,7 +175,7 @@ namespace pinocchio
template<typename Scalar_, int NumIndices_, int Options_ = 0, typename IndexType = Eigen::DenseIndex>
using Tensor = Eigen::Tensor<Scalar_,NumIndices_,Options_,IndexType>;
#endif // ifndef PINOCCHIO_WITH_CXX11_SUPPORT
#endif // ifndef PINOCCHIO_WITH_EIGEN_TENSOR_MODULE
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment