Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pinocchio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
pinocchio
Commits
cad37c2e
Verified
Commit
cad37c2e
authored
5 years ago
by
Justin Carpentier
Browse files
Options
Downloads
Patches
Plain Diff
core: add PINOCCHIO_WITH_EIGEN_TENSOR_MODULE
Related to #987
parent
9128f8a8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/eigen-macros.hpp
+5
-0
5 additions, 0 deletions
src/eigen-macros.hpp
src/math/tensor.hpp
+3
-3
3 additions, 3 deletions
src/math/tensor.hpp
with
8 additions
and
3 deletions
src/eigen-macros.hpp
+
5
−
0
View file @
cad37c2e
...
...
@@ -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__
This diff is collapsed.
Click to expand it.
src/math/tensor.hpp
+
3
−
3
View file @
cad37c2e
...
...
@@ -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
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment