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 {
128 Eigen::Map<ArrayData> result_map = res.
array_map();
137 Eigen::Map<ArrayData> result_map = res.
array_map();
138 result_map = this->
array_map().inverse();
146 Eigen::Map<ArrayData> result_map = res.
array_map();
184 Eigen::Map<VecData> result_map = res.
eigen_map();
200 Eigen::Map<ArrayData> result_map = res.
array_map();
213 Eigen::Map<ArrayData> result_map = res.
array_map();
230 Eigen::Map<ArrayData> result_map = res.
array_map();
243 Eigen::Map<ArrayData> result_map = res.
array_map();
259 Eigen::Map<ArrayData> result_map = res.
array_map();
344 Eigen::Map<typename ArenaVec<T>::VecData> result_map = res.
eigen_map();
351 typedef Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> MatData;
355 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
Addition operator.
ArenaVec< T > get_vec() const
Convert ArenaOVec to ArenaVec and its.
ArenaOVec(const ArenaVec< T > &vec)
ArenaOVec< T > & operator=(const ArenaOVec< T > &other)
Assignment operator.
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
Multiplication operator.
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
Returns copied vector of square root values.
ArenaVec< T > operator*(T multi) const
ArenaVec< T > operator*(const ArenaVec< T > &other) const
Eigen::Map< VecData > eigen_map()
ArenaVec< T > abs() const
Returns copied vector of absolute values.
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
Returns copied vector of inverse values.
ArenaVec< T > & operator=(const ArenaVec< T > &other)
Assignment operator.
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 scalar_val() const
Getter for scalar_val_.
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...