Template Class ModelPoolTpl

Inheritance Relationships

Derived Type

Class Documentation

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

Subclassed by pinocchio::GeometryPoolTpl< _Scalar, _Options, JointCollectionTpl >

Public Types

Values:

enumerator Options
typedef ModelTpl<Scalar, Options, JointCollectionTpl> Model
typedef DataTpl<Scalar, Options, JointCollectionTpl> Data
typedef std::vector<Model, Eigen::aligned_allocator<Model>> ModelVector
typedef std::vector<Data, Eigen::aligned_allocator<Data>> DataVector

Public Functions

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

Default constructor from a model and a pool size.

Parameters:
  • model[in] input model used for parallel computations.

  • pool_size[in] total size of the pool.

inline ModelPoolTpl(const ModelPoolTpl &pool_model)

Copy constructor from an other PoolModel.

Parameters:

pool_model[in] PoolModel to copy.

inline const Model &model() const

Returns the model stored within the pool.

inline Model &model()

Returns the model stored within the pool.

inline void update(const Model &model)

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

Parameters:

model[in] new model value.

inline void update(const Data &data)

Update all the datas with the input data value.

Parameters:

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

inline 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.

Parameters:
  • geometry_model[in] new geometry model value.

  • geometry_data[in] new geometry data value

inline int size() const

Returns the size of the pool.

inline void resize(const int new_size)

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

inline const DataVector &datas() const

Returns the data vectors.

inline DataVector &datas()

Returns the data vectors.

inline const Data &data(const size_t index) const

Return a specific data.

inline Data &data(const size_t index)

Returns a specific data.

inline virtual ~ModelPoolTpl()

Destructor

Public Members

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar

Protected Functions

inline virtual void do_resize(const int new_size)

Method to implement in the derived classes.

Protected Attributes

Model m_model

Model stored within the pool.

DataVector m_datas

Vector of data elements

int m_size

Number of threads used for parallel computations.