pinocchio  2.6.3
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
ModelPoolTpl< _Scalar, _Options, JointCollectionTpl > Class Template Reference
Inheritance diagram for ModelPoolTpl< _Scalar, _Options, JointCollectionTpl >:
Collaboration diagram for ModelPoolTpl< _Scalar, _Options, JointCollectionTpl >:

Public Types

enum  { Options = _Options }
 
typedef DataTpl< Scalar, Options, JointCollectionTpl > Data
 
typedef std::vector< Data, Eigen::aligned_allocator< Data > > DataVector
 
typedef ModelTpl< Scalar, Options, JointCollectionTpl > Model
 
typedef std::vector< Model, Eigen::aligned_allocator< Model > > ModelVector
 
typedef _Scalar Scalar
 

Public Member Functions

 ModelPoolTpl (const Model &model, const int pool_size=omp_get_max_threads())
 Default constructor from a model and a pool size. More...
 
 ModelPoolTpl (const ModelPoolTpl &pool_model)
 Copy constructor from an other PoolModel. More...
 
virtual ~ModelPoolTpl ()
  . More...
 
const Data & data (const size_t index) const
 Return a specific data.
 
Data & data (const size_t index)
 Returns a specific data.
 
const DataVector & datas () const
 Returns the data vectors.
 
DataVector & datas ()
 Returns the data vectors.
 
const Model & model () const
 Returns the model stored within the pool.
 
Model & model ()
 Returns the model stored within the pool.
 
void resize (const int new_size)
 Set the size of the pool and perform the appropriate resize.
 
int size () const
 Returns the size of the pool.
 
void update (const Model &model)
 Update the model, meaning that all the datas will be refreshed accordingly. More...
 
void update (const Data &data)
 Update all the datas with the input data value. More...
 
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 replaced. More...
 

Protected Member Functions

virtual void do_resize (const int new_size)
  . More...
 

Protected Attributes

DataVector m_datas
  . More...
 
Model m_model
 Model stored within the pool.
 
int m_size
 Number of threads used for parallel computations.
 

Detailed Description

template<typename _Scalar, int _Options, template< typename, int > class JointCollectionTpl>
class pinocchio::ModelPoolTpl< _Scalar, _Options, JointCollectionTpl >

Definition at line 19 of file model.hpp.

Constructor & Destructor Documentation

◆ ModelPoolTpl() [1/2]

ModelPoolTpl ( const Model &  model,
const int  pool_size = omp_get_max_threads() 
)
inlineexplicit

Default constructor from a model and a pool size.

Parameters
[in]modelinput model used for parallel computations.
[in]pool_sizetotal size of the pool.

Definition at line 39 of file model.hpp.

◆ ModelPoolTpl() [2/2]

ModelPoolTpl ( const ModelPoolTpl< _Scalar, _Options, JointCollectionTpl > &  pool_model)
inline

Copy constructor from an other PoolModel.

Parameters
[in]pool_modelPoolModel to copy.

Definition at line 50 of file model.hpp.

◆ ~ModelPoolTpl()

virtual ~ModelPoolTpl ( )
inlinevirtual

 .

Destructor

Definition at line 135 of file model.hpp.

Member Function Documentation

◆ do_resize()

virtual void do_resize ( const int  new_size)
inlineprotectedvirtual

 .

Method to implement in the derived classes.

Reimplemented in GeometryPoolTpl< _Scalar, _Options, JointCollectionTpl >.

Definition at line 149 of file model.hpp.

◆ update() [1/3]

void update ( const Model &  model)
inline

Update the model, meaning that all the datas will be refreshed accordingly.

 

Parameters
[in]modelnew model value.

Definition at line 66 of file model.hpp.

◆ update() [2/3]

void update ( const Data &  data)
inline

Update all the datas with the input data value.

 

Parameters
[in]datanew value to use and to copy within the vector of data.

Definition at line 76 of file model.hpp.

◆ update() [3/3]

void update ( const Model &  model,
const Data &  data 
)
inline

Update the model and data with the new input values. In this case, all the geometry_datas will be replaced.

Parameters
[in]geometry_modelnew geometry model value.
[in]geometry_datanew geometry data value

Definition at line 88 of file model.hpp.

Member Data Documentation

◆ m_datas

DataVector m_datas
protected

 .

Vector of data elements

Definition at line 143 of file model.hpp.


The documentation for this class was generated from the following file: