24 #include <Eigen/Dense>
38 typedef Eigen::Matrix<T, Eigen::Dynamic, 1>
VecData;
39 typedef Eigen::Array<T, Eigen::Dynamic, 1>
ArrayData;
74 inline const Eigen::Map<VecData>
eigen_map()
const {
88 inline const Eigen::Map<ArrayData>
array_map()
const {
122 Eigen::Map<ArrayData> result_map = res.
array_map();
130 Eigen::Map<ArrayData> result_map = res.
array_map();
131 result_map = this->
array_map().inverse();
138 Eigen::Map<ArrayData> result_map = res.
array_map();
169 Eigen::Map<VecData> result_map = res.
eigen_map();
179 Eigen::Map<ArrayData> result_map = res.
array_map();
187 Eigen::Map<ArrayData> result_map = res.
array_map();
197 Eigen::Map<ArrayData> result_map = res.
array_map();
205 Eigen::Map<ArrayData> result_map = res.
array_map();
215 Eigen::Map<ArrayData> result_map = res.
array_map();
299 Eigen::Map<typename ArenaVec<T>::VecData> result_map = res.
eigen_map();
306 typedef Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> MatData;
310 Eigen::Map<MatData> result_map = Eigen::Map<MatData>(res.
data_ptr(), this->data_size_, other.
data_size());
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
#define ASSERT_PTR(ptr)
Definition of assert macro checking non-null pointer (PTR) only for debug mode.
ArenaOVec< T > operator+(const ArenaOVec< T > &other) const
ArenaVec< T > get_vec() const
Convert ArenaOVec to ArenaVec and its.
ArenaOVec(const ArenaVec< T > &vec)
ArenaOVec< T > & operator=(const ArenaOVec< T > &other)
ArenaOVec(const ArenaOVec< T > &other)
Copy constructor.
ArenaOVec(T scalar_val)
Constructor. Set scalar_val.
ArenaOVec()
Default constructor.
ArenaOVec< T > operator*(const ArenaOVec< T > &other) const
Eigen::Array< T, Eigen::Dynamic, 1 > ArrayData
ArenaVec()
Default constructor, set invalid data pointer.
Eigen::Matrix< T, Eigen::Dynamic, 1 > VecData
Type definition.
ArenaVec< T > operator/(const ArenaVec< T > &other) const
const T * data_ptr() const
Smae as previous but return const pointer.
PatchArena & arena()
Getter for arena_.
T * data_ptr()
Return data pointer (development method)
const T & operator()(std::size_t item) const
For development only. TODO remove.
const Eigen::Map< ArrayData > array_map() const
Smae as previous but with const modifier.
ArenaVec< T > sqrt() const
ArenaVec< T > operator*(T multi) const
ArenaVec< T > operator*(const ArenaVec< T > &other) const
Eigen::Map< VecData > eigen_map()
ArenaVec< T > abs() const
Eigen::Map< ArrayData > array_map()
size_t data_size_
Length of data array.
const Eigen::Map< VecData > eigen_map() const
Smae as previous but with const modifier.
ArenaVec< T > operator/(T div_by) const
ArenaVec< T > inverse() const
ArenaVec< T > & operator=(const ArenaVec< T > &other)
void set_patch_arena(PatchArena &arena)
Set pointer to PatchArena.
ArenaVec< T > operator-(const ArenaVec< T > &other) const
PatchArena * arena_
Pointer to Arena where intermediate calculations and results are stored, should be changed by set_pat...
T & operator()(std::size_t item)
For development only. TODO remove.
ArenaVec< T > operator+(const ArenaVec< T > &other) const
ArenaVec(size_t data_size, PatchArena &arena)
ArenaVec(const ArenaVec< T > &other)
Copy constructor.
ArenaVec(T *data_ptr, size_t data_size, PatchArena &arena)
Constructor. Allows create ArenaVec from ArenaOVec.
size_t data_size() const
Getter for data_size_.
T scalar_val_
Scalar value of T type.
T * data_ptr_
Pointer to data array.
T * allocate_simd(size_t n_items)
Allocate and return data pointer of n_item array of type T (alignment to length given by simd_alignme...