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>
23 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
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));
122 "Index greater than the size of the datas vector.");
130 "Index greater than the size of the datas vector.");
159 #endif // ifndef __pinocchio_multibody_pool_model_hpp__
ModelPoolTpl(const ModelPoolTpl &pool_model)
Copy constructor from an other PoolModel.
Model m_model
Model stored within the pool.
#define PINOCCHIO_CHECK_INPUT_ARGUMENT(...)
Macro to check an assert-like condition and throw a std::invalid_argument exception (with a message) ...
void resize(const int new_size)
Set the size of the pool and perform the appropriate resize.
DataTpl< Scalar, Options, JointCollectionTpl > Data
ModelPoolTpl(const Model &model, const int pool_size=omp_get_max_threads())
Default constructor from a model and a pool size.
virtual void do_resize(const int new_size)
 
Data & data(const size_t index)
Returns a specific data.
ModelPoolTpl< double, 0, JointCollectionDefaultTpl > ModelPool
int m_size
Number of threads used for parallel computations.
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.
ModelTpl< Scalar, Options, JointCollectionTpl > Model
virtual ~ModelPoolTpl()
 
std::vector< Model, Eigen::aligned_allocator< Model > > ModelVector
const Model & model() const
Returns the model stored within the pool.
const DataVector & datas() const
Returns the data vectors.
void update(const Data &data)
Update all the datas with the input data value.
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...
int size() const
Returns the size of the pool.
DataVector & datas()
Returns the data vectors.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
const Data & data(const size_t index) const
Return a specific data.
Main pinocchio namespace.
#define PINOCCHIO_UNUSED_VARIABLE(var)
Helper to declare that a parameter is unused.
std::vector< Data, Eigen::aligned_allocator< Data > > DataVector
pinocchio
Author(s):
autogenerated on Tue Feb 13 2024 03:43:59