pinocchio  3.7.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
 
Loading...
Searching...
No Matches
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.
 
 ModelPoolTpl (const ModelPoolTpl &pool)
 Copy constructor from an other PoolModel.
 
virtual ~ModelPoolTpl ()
  
 
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.
 

Protected Member Functions

virtual void doResize (const size_t new_size)
  
 

Protected Attributes

DataVector m_datas
  
 
ModelVector m_models
  
 

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.

Member Typedef Documentation

◆ Data

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
typedef DataTpl<Scalar, Options, JointCollectionTpl> Data

Definition at line 31 of file model.hpp.

◆ DataVector

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
typedef std::vector<Data, Eigen::aligned_allocator<Data> > DataVector

Definition at line 34 of file model.hpp.

◆ Model

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
typedef ModelTpl<Scalar, Options, JointCollectionTpl> Model

Definition at line 30 of file model.hpp.

◆ ModelVector

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
typedef std::vector<Model, Eigen::aligned_allocator<Model> > ModelVector

Definition at line 33 of file model.hpp.

◆ Scalar

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
typedef _Scalar Scalar

Definition at line 24 of file model.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
anonymous enum

Definition at line 25 of file model.hpp.

Constructor & Destructor Documentation

◆ ModelPoolTpl() [1/2]

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
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]

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
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()

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
virtual ~ModelPoolTpl ( )
inlinevirtual

 

Destructor

Definition at line 151 of file model.hpp.

Member Function Documentation

◆ doResize()

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
virtual void doResize ( const size_t  new_size)
inlineprotectedvirtual

◆ getData() [1/2]

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
Data & getData ( const size_t  index)
inline

Returns a specific data.

Definition at line 143 of file model.hpp.

◆ getData() [2/2]

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
const Data & getData ( const size_t  index) const
inline

Return a specific data.

Definition at line 135 of file model.hpp.

◆ getDatas() [1/2]

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
DataVector & getDatas ( )
inline

Returns the data vector.

Definition at line 129 of file model.hpp.

◆ getDatas() [2/2]

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
const DataVector & getDatas ( ) const
inline

Returns the data vector.

Definition at line 123 of file model.hpp.

◆ getModel() [1/2]

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
Model & getModel ( const size_t  index)
inline

Returns a specific model.

Definition at line 115 of file model.hpp.

◆ getModel() [2/2]

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
const Model & getModel ( const size_t  index) const
inline

Return a specific model.

Definition at line 107 of file model.hpp.

◆ getModels() [1/2]

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
ModelVector & getModels ( )
inline

Returns the vector of models.

Definition at line 101 of file model.hpp.

◆ getModels() [2/2]

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
const ModelVector & getModels ( ) const
inline

Returns the vector of models.

Definition at line 95 of file model.hpp.

◆ resize()

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
void resize ( const size_t  new_size)
inline

Set the size of the pool and perform the appropriate resize.

Definition at line 74 of file model.hpp.

◆ size()

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
size_t size ( ) const
inline

Returns the size of the pool.

Definition at line 68 of file model.hpp.

◆ update()

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
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

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
DataVector m_datas
protected

 

Vector of data elements

Definition at line 158 of file model.hpp.

◆ m_models

template<typename _Scalar , int _Options, template< typename, int > class JointCollectionTpl>
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: