pinocchio  3.3.1
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 >:

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 size_t pool_size=(size_t) omp_get_max_threads())
 Default constructor from a model and a pool size. More...
 
 ModelPoolTpl (const ModelPoolTpl &pool)
 Copy constructor from an other PoolModel. More...
 
virtual ~ModelPoolTpl ()
   More...
 
DatagetData (const size_t index)
 Returns a specific data.
 
const DatagetData (const size_t index) const
 Return a specific data.
 
DataVector & getDatas ()
 Returns the data vector.
 
const DataVector & getDatas () const
 Returns the data vector.
 
ModelgetModel (const size_t index)
 Returns a specific model.
 
const ModelgetModel (const size_t index) const
 Return a specific model.
 
ModelVector & getModels ()
 Returns the vector of models.
 
const ModelVector & getModels () const
 Returns the vector of models.
 
void resize (const size_t new_size)
 Set the size of the pool and perform the appropriate resize.
 
size_t size () const
 Returns the size of the pool.
 
void update (const Data &data)
 Update all the datas with the input data value. More...
 

Protected Member Functions

virtual void doResize (const size_t new_size)
   More...
 

Protected Attributes

DataVector m_datas
   More...
 
ModelVector m_models
   More...
 

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 size_t  pool_size = (size_t)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 41 of file model.hpp.

◆ ModelPoolTpl() [2/2]

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

Copy constructor from an other PoolModel.

Parameters
[in]pool_modelPoolModel to copy.

Definition at line 52 of file model.hpp.

◆ ~ModelPoolTpl()

virtual ~ModelPoolTpl ( )
inlinevirtual

 

Destructor

Definition at line 151 of file model.hpp.

Member Function Documentation

◆ doResize()

virtual void doResize ( const size_t  new_size)
inlineprotectedvirtual

◆ update()

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 62 of file model.hpp.

Member Data Documentation

◆ m_datas

DataVector m_datas
protected

 

Vector of data elements

Definition at line 158 of file model.hpp.

◆ m_models

ModelVector m_models
protected

 

Vector of model

Definition at line 155 of file model.hpp.


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