Flow123d  DF_patch_fe_data_tables-da7858b
Public Types | Public Member Functions | Protected Attributes | List of all members
ArenaVec< T > Class Template Reference

#include <arena_resource.hh>

Collaboration diagram for ArenaVec< T >:
Collaboration graph
[legend]

Public Types

typedef Eigen::Matrix< T, Eigen::Dynamic, 1 > VecData
 Type definition. More...
 

Public Member Functions

 ArenaVec ()
 Default constructor, set invalid data pointer. More...
 
 ArenaVec (T scalar_val)
 
 ArenaVec (size_t data_size, AssemblyArena &arena)
 
Eigen::Map< VecDataeigen_map ()
 
T * data_ptr ()
 Return data pointer (development method) More...
 
size_t data_size () const
 Getter for data_size_. More...
 
T & operator() (std::size_t item)
 For development only. TODO remove. More...
 
ArenaVec< T > operator+ (const ArenaVec< T > &other) const
 
ArenaVec< T > operator* (T multi) const
 

Protected Attributes

T * data_ptr_
 Pointer to data array. More...
 
size_t data_size_
 Length of data array. More...
 
AssemblyArenaarena_
 Pointer to Arena. More...
 
scalar_val_
 Scalar value of T type. More...
 

Detailed Description

template<class T>
class ArenaVec< T >

Define vector allocated in Arena and aligned to SIMD size.

Definition at line 94 of file arena_resource.hh.

Member Typedef Documentation

◆ VecData

template<class T >
typedef Eigen::Matrix<T, Eigen::Dynamic, 1> ArenaVec< T >::VecData

Type definition.

Definition at line 97 of file arena_resource.hh.

Constructor & Destructor Documentation

◆ ArenaVec() [1/3]

template<class T >
ArenaVec< T >::ArenaVec ( )
inline

Default constructor, set invalid data pointer.

Definition at line 100 of file arena_resource.hh.

◆ ArenaVec() [2/3]

template<class T >
ArenaVec< T >::ArenaVec ( scalar_val)
inline

Constructor. Set scalar value

Definition at line 106 of file arena_resource.hh.

◆ ArenaVec() [3/3]

template<class T >
ArenaVec< T >::ArenaVec ( size_t  data_size,
AssemblyArena arena 
)
inline

Constructor. Set sizes and allocate data pointer

Definition at line 112 of file arena_resource.hh.

Member Function Documentation

◆ data_ptr()

template<class T >
T* ArenaVec< T >::data_ptr ( )
inline

Return data pointer (development method)

Definition at line 126 of file arena_resource.hh.

◆ data_size()

template<class T >
size_t ArenaVec< T >::data_size ( ) const
inline

Getter for data_size_.

Definition at line 131 of file arena_resource.hh.

Here is the caller graph for this function:

◆ eigen_map()

template<class T >
Eigen::Map<VecData> ArenaVec< T >::eigen_map ( )
inline

Maps data pointer to Eigen Map of dimensions given data_size_ and returns it.

Definition at line 120 of file arena_resource.hh.

Here is the caller graph for this function:

◆ operator()()

template<class T >
T& ArenaVec< T >::operator() ( std::size_t  item)
inline

For development only. TODO remove.

Definition at line 136 of file arena_resource.hh.

◆ operator*()

template<class T >
ArenaVec<T> ArenaVec< T >::operator* ( multi) const
inline

Definition at line 149 of file arena_resource.hh.

◆ operator+()

template<class T >
ArenaVec<T> ArenaVec< T >::operator+ ( const ArenaVec< T > &  other) const
inline

Definition at line 141 of file arena_resource.hh.

Member Data Documentation

◆ arena_

template<class T >
AssemblyArena* ArenaVec< T >::arena_
protected

Pointer to Arena.

Definition at line 159 of file arena_resource.hh.

◆ data_ptr_

template<class T >
T* ArenaVec< T >::data_ptr_
protected

Pointer to data array.

Definition at line 157 of file arena_resource.hh.

◆ data_size_

template<class T >
size_t ArenaVec< T >::data_size_
protected

Length of data array.

Definition at line 158 of file arena_resource.hh.

◆ scalar_val_

template<class T >
T ArenaVec< T >::scalar_val_
protected

Scalar value of T type.

Definition at line 160 of file arena_resource.hh.


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