5#ifndef __pinocchio_multibody_pool_model_hpp__
6#define __pinocchio_multibody_pool_model_hpp__
10#include "pinocchio/multibody/pool/fwd.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>
33 typedef std::vector<Model, Eigen::aligned_allocator<Model>> ModelVector;
34 typedef std::vector<Data, Eigen::aligned_allocator<Data>> DataVector;
109 PINOCCHIO_CHECK_INPUT_ARGUMENT(
110 index <
m_models.size(),
"Index greater than the size of the model vector.");
117 PINOCCHIO_CHECK_INPUT_ARGUMENT(
118 index <
m_models.size(),
"Index greater than the size of the model vector.");
137 PINOCCHIO_CHECK_INPUT_ARGUMENT(
138 index <
m_datas.size(),
"Index greater than the size of the datas vector.");
145 PINOCCHIO_CHECK_INPUT_ARGUMENT(
146 index <
m_datas.size(),
"Index greater than the size of the datas vector.");
163 PINOCCHIO_UNUSED_VARIABLE(
new_size);
DataVector & getDatas()
Returns the data vector.
size_t size() const
Returns the size of the pool.
void update(const Data &data)
Update all the datas with the input data value.
const Model & getModel(const size_t index) const
Return a specific model.
const DataVector & getDatas() const
Returns the data vector.
const ModelVector & getModels() const
Returns the vector of models.
ModelVector & getModels()
Returns the vector of models.
Model & getModel(const size_t index)
Returns a specific model.
ModelVector m_models
 
void resize(const size_t new_size)
Set the size of the pool and perform the appropriate resize.
const Data & getData(const size_t index) const
Return a specific data.
Data & getData(const size_t index)
Returns a specific data.
virtual void doResize(const size_t new_size)
 
ModelPoolTpl(const Model &model, const size_t pool_size=(size_t) omp_get_max_threads())
Default constructor from a model and a pool size.
ModelPoolTpl(const ModelPoolTpl &pool)
Copy constructor from an other PoolModel.
virtual ~ModelPoolTpl()
 
Main pinocchio namespace.