Verified Commit 40eab07e authored by Justin Carpentier's avatar Justin Carpentier
Browse files

serialization/eigen: template specialization for Eigen::DSizes

parent 16f686ab
......@@ -83,6 +83,28 @@ namespace boost
split_free(ar,a,version);
}
#ifdef PINOCCHIO_WITH_EIGEN_TENSOR_MODULE
template <class Archive, typename _IndexType, std::size_t _NumIndices>
void save(Archive & ar, const Eigen::DSizes<_IndexType,_NumIndices> & ds, const unsigned int version)
{
save(ar,static_cast<const Eigen::array<_IndexType,_NumIndices> &>(ds),version);
}
template <class Archive, typename _IndexType, std::size_t _NumIndices>
void load(Archive & ar, Eigen::DSizes<_IndexType,_NumIndices> & ds, const unsigned int version)
{
load(ar,static_cast<Eigen::array<_IndexType,_NumIndices> &>(ds),version);
}
template <class Archive, typename _IndexType, std::size_t _NumIndices>
void serialize(Archive & ar, Eigen::DSizes<_IndexType,_NumIndices> & ds, const unsigned int version)
{
split_free(ar,static_cast<Eigen::array<_IndexType,_NumIndices> &>(ds),version);
}
#endif
template <class Archive, typename _Scalar, int _NumIndices, int _Options, typename _IndexType>
void save(Archive & ar, const ::pinocchio::Tensor<_Scalar,_NumIndices,_Options,_IndexType> & t, const unsigned int /*version*/)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment