Line |
Branch |
Exec |
Source |
1 |
|
|
// |
2 |
|
|
// Copyright (c) 2017-2024 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 |
22 |
|
✗ |
serialize(Archive & ar, pinocchio::container::aligned_vector<T> & v, const unsigned int version) |
23 |
|
|
{ |
24 |
|
✗ |
split_free(ar, v, version); |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
#if BOOST_VERSION / 100 % 1000 == 58 |
28 |
|
|
template<class T> |
29 |
|
|
inline const fixme::nvp<pinocchio::container::aligned_vector<T>> |
30 |
|
|
make_nvp(const char * name, pinocchio::container::aligned_vector<T> & t) |
31 |
|
|
{ |
32 |
|
|
return fixme::nvp<pinocchio::container::aligned_vector<T>>(name, t); |
33 |
|
|
} |
34 |
|
|
#else |
35 |
|
|
template<class T> |
36 |
|
|
inline const nvp<pinocchio::container::aligned_vector<T>> |
37 |
|
✗ |
make_nvp(const char * name, pinocchio::container::aligned_vector<T> & t) |
38 |
|
|
{ |
39 |
|
✗ |
return nvp<pinocchio::container::aligned_vector<T>>(name, t); |
40 |
|
|
} |
41 |
|
|
#endif |
42 |
|
|
|
43 |
|
|
} // namespace serialization |
44 |
|
|
|
45 |
|
|
} // namespace boost |
46 |
|
|
|
47 |
|
|
#endif // ifndef __pinocchio_serialization_aligned_vector_hpp__ |
48 |
|
|
|