Go to the documentation of this file.
5 #ifndef __pinocchio_multibody_pool_model_hpp__
6 #define __pinocchio_multibody_pool_model_hpp__
18 template<
typename _Scalar,
int _Options,
template<
typename,
int>
class JointCollectionTpl>
22 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
33 typedef std::vector<Model, Eigen::aligned_allocator<Model>>
ModelVector;
34 typedef std::vector<Data, Eigen::aligned_allocator<Data>>
DataVector;
42 const Model &
model,
const size_t pool_size = (
size_t)omp_get_max_threads())
78 m_datas.resize((
size_t)new_size);
82 typename ModelVector::iterator model_it =
m_models.begin();
83 std::advance(model_it, (
long)(new_size -
size));
86 typename DataVector::iterator data_it =
m_datas.begin();
87 std::advance(data_it, (
long)(new_size -
size));
110 index <
m_models.size(),
"Index greater than the size of the model vector.");
118 index <
m_models.size(),
"Index greater than the size of the model vector.");
138 index <
m_datas.size(),
"Index greater than the size of the datas vector.");
146 index <
m_datas.size(),
"Index greater than the size of the datas vector.");
169 #endif // ifndef __pinocchio_multibody_pool_model_hpp__
void resize(const size_t new_size)
Set the size of the pool and perform the appropriate resize.
#define PINOCCHIO_CHECK_INPUT_ARGUMENT(...)
Macro to check an assert-like condition and throw a std::invalid_argument exception (with a message) ...
const ModelVector & getModels() const
Returns the vector of models.
ModelPoolTpl(const Model &model, const size_t pool_size=(size_t) omp_get_max_threads())
Default constructor from a model and a pool size.
const Model & getModel(const size_t index) const
Return a specific model.
DataTpl< Scalar, Options, JointCollectionTpl > Data
ModelPoolTpl(const ModelPoolTpl &pool)
Copy constructor from an other PoolModel.
ModelVector & getModels()
Returns the vector of models.
virtual ~ModelPoolTpl()
 
const Data & getData(const size_t index) const
Return a specific data.
DataVector & getDatas()
Returns the data vector.
Data & getData(const size_t index)
Returns a specific data.
void update(const Data &data)
Update all the datas with the input data value.
ModelTpl< Scalar, Options, JointCollectionTpl > Model
const DataVector & getDatas() const
Returns the data vector.
ModelVector m_models
 
Model & getModel(const size_t index)
Returns a specific model.
virtual void doResize(const size_t new_size)
 
std::vector< Data, Eigen::aligned_allocator< Data > > DataVector
std::vector< Model, Eigen::aligned_allocator< Model > > ModelVector
size_t size() const
Returns the size of the pool.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
JointCollectionTpl & model
Main pinocchio namespace.
#define PINOCCHIO_UNUSED_VARIABLE(var)
Helper to declare that a parameter is unused.
pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:11