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

core: fix alignement issues for Eigen::Tensor

parent 437e02ef
No related branches found
No related tags found
No related merge requests found
/* /*
* Copyright 2023, INRIA * Copyright 2023 INRIA
*/ */
#ifndef __eigenpy_alignment_hpp__ #ifndef __eigenpy_alignment_hpp__
...@@ -67,6 +67,23 @@ struct referent_storage< ...@@ -67,6 +67,23 @@ struct referent_storage<
typename eigenpy::aligned_storage<referent_size<T &>::value>::type type; typename eigenpy::aligned_storage<referent_size<T &>::value>::type type;
}; };
#ifdef EIGENPY_WITH_TENSOR_SUPPORT
template <typename Scalar, int Rank, int Options, typename IndexType>
struct referent_storage<Eigen::Tensor<Scalar, Rank, Options, IndexType> &> {
typedef Eigen::Tensor<Scalar, Rank, Options, IndexType> T;
typedef
typename eigenpy::aligned_storage<referent_size<T &>::value>::type type;
};
template <typename Scalar, int Rank, int Options, typename IndexType>
struct referent_storage<
const Eigen::Tensor<Scalar, Rank, Options, IndexType> &> {
typedef Eigen::Tensor<Scalar, Rank, Options, IndexType> T;
typedef
typename eigenpy::aligned_storage<referent_size<T &>::value>::type type;
};
#endif
template <typename Scalar, int Options> template <typename Scalar, int Options>
struct referent_storage<Eigen::Quaternion<Scalar, Options> &> { struct referent_storage<Eigen::Quaternion<Scalar, Options> &> {
typedef Eigen::Quaternion<Scalar, Options> T; typedef Eigen::Quaternion<Scalar, Options> T;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment