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 size_t pool_size = (size_t)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)

Copy constructor from an other PoolModel.

Parameters:

pool_model[in] PoolModel to copy.

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 size_t size() const

Returns the size of the pool.

inline void resize(const size_t new_size)

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

inline const ModelVector &getModels() const

Returns the vector of models.

inline ModelVector &getModels()

Returns the vector of models.

inline const Model &getModel(const size_t index) const

Return a specific model.

inline Model &getModel(const size_t index)

Returns a specific model.

inline const DataVector &getDatas() const

Returns the data vector.

inline DataVector &getDatas()

Returns the data vector.

inline const Data &getData(const size_t index) const

Return a specific data.

inline Data &getData(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 doResize(const size_t new_size)

Method to implement in the derived classes.

Protected Attributes

ModelVector m_models

Vector of model

DataVector m_datas

Vector of data elements