serialization/aligned-vector.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2017-2019 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_serialization_aligned_vector_hpp__
6 #define __pinocchio_serialization_aligned_vector_hpp__
7 
8 #include "pinocchio/container/aligned-vector.hpp"
9 
10 #include <boost/serialization/nvp.hpp>
11 #include <boost/serialization/split_free.hpp>
12 #include "pinocchio/serialization/vector.hpp"
13 
14 namespace boost
15 {
16 
17  namespace serialization
18  {
19 
20  template <class Archive, typename T>
21  void serialize(Archive & ar,
23  const unsigned int version)
24  {
25  typedef typename pinocchio::container::aligned_vector<T>::vector_base vector_base;
26  split_free(ar,*static_cast<vector_base*>(&v),version);
27  }
28 
29 #if BOOST_VERSION / 100 % 1000 == 58
30  template<class T>
31  inline
32  const fixme::nvp< typename pinocchio::container::aligned_vector<T>::vector_base >
34  {
35  typedef typename pinocchio::container::aligned_vector<T>::vector_base vector_base;
36  return fixme::nvp< vector_base >(name, *static_cast<vector_base*>(&t));
37  }
38 #else
39  template<class T>
40  inline
41  const nvp< typename pinocchio::container::aligned_vector<T>::vector_base >
43  {
44  typedef typename pinocchio::container::aligned_vector<T>::vector_base vector_base;
45  return nvp< vector_base >(name, *static_cast<vector_base*>(&t));
46  }
47 #endif
48 
49  }
50 
51 }
52 
53 #endif // ifndef __pinocchio_serialization_aligned_vector_hpp__
::std::vector< T, Eigen::aligned_allocator< T > > vector_base
Specialization of an std::vector with an aligned allocator. This specialization might be used when th...
const nvp< typename pinocchio::container::aligned_vector< T >::vector_base > make_nvp(const char *name, pinocchio::container::aligned_vector< T > &t)
void serialize(Archive &ar, pinocchio::container::aligned_vector< T > &v, const unsigned int version)


pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:02