|
pinocchio
2.7.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
|
|
5 #ifndef __pinocchio_multibody_pool_model_hpp__
6 #define __pinocchio_multibody_pool_model_hpp__
11 #include "pinocchio/multibody/model.hpp"
12 #include "pinocchio/multibody/data.hpp"
14 #include "pinocchio/utils/openmp.hpp"
18 template<
typename _Scalar,
int _Options,
template<
typename,
int>
class JointCollectionTpl>
23 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
25 typedef _Scalar Scalar;
26 enum { Options = _Options };
31 typedef std::vector<Model,Eigen::aligned_allocator<Model> > ModelVector;
32 typedef std::vector<Data,Eigen::aligned_allocator<Data> > DataVector;
40 const int pool_size = omp_get_max_threads())
101 m_datas.resize((
size_t)new_size);
104 typename DataVector::iterator it =
m_datas.begin();
105 std::advance(it, (
long)(new_size -
m_size));
121 PINOCCHIO_CHECK_INPUT_ARGUMENT(index <
m_datas.size(),
122 "Index greater than the size of the datas vector.");
129 PINOCCHIO_CHECK_INPUT_ARGUMENT(index <
m_datas.size(),
130 "Index greater than the size of the datas vector.");
151 PINOCCHIO_UNUSED_VARIABLE(new_size);
156 typedef ModelPoolTpl<double,0,JointCollectionDefaultTpl> ModelPool;
159 #endif // ifndef __pinocchio_multibody_pool_model_hpp__
ModelPoolTpl(const ModelPoolTpl &pool_model)
Copy constructor from an other PoolModel.
int m_size
Number of threads used for parallel computations.
int size() const
Returns the size of the pool.
const Model & model() const
Returns the model stored within the pool.
virtual void do_resize(const int new_size)
 
void update(const Model &model, const Data &data)
Update the model and data with the new input values. In this case, all the geometry_datas will be rep...
void update(const Data &data)
Update all the datas with the input data value.
DataVector & datas()
Returns the data vectors.
virtual ~ModelPoolTpl()
 
const Data & data(const size_t index) const
Return a specific data.
void update(const Model &model)
Update the model, meaning that all the datas will be refreshed accordingly.
Model & model()
Returns the model stored within the pool.
ModelPoolTpl(const Model &model, const int pool_size=omp_get_max_threads())
Default constructor from a model and a pool size.
void resize(const int new_size)
Set the size of the pool and perform the appropriate resize.
Model m_model
Model stored within the pool.
Data & data(const size_t index)
Returns a specific data.
const DataVector & datas() const
Returns the data vectors.
Main pinocchio namespace.