Iterative horizontal accumulator. Calculates the horizontal accumulation of multiple (Vec<T, SIMD_WIDTH>::elems) Vec's into a single Vec in parallel with the Vec's to be accumulated pushed one by one.
More...
template<class HOp, typename T, size_t SIMD_WIDTH>
struct simd::HAcc< HOp, T, SIMD_WIDTH >
Iterative horizontal accumulator. Calculates the horizontal accumulation of multiple (Vec<T, SIMD_WIDTH>::elems) Vec's into a single Vec in parallel with the Vec's to be accumulated pushed one by one.
- Template Parameters
-
|
void | finish () |
| Finishes the horizontal accumulation by pushing neutral values until the horizontal accumulation is done.
|
|
Vec< T, SIMD_WIDTH > | get () |
| Gets the result of the horizontal accumulation. Finishes the horizontal accumulation if it is not done yet.
|
|
bool | isDone () const |
| Checks if the horizontal accumulation is done.
|
|
bool | isEmpty () const |
| Checks if the horizontal accumulation is empty, i.e. if no Vec has been pushed yet.
|
|
void | push (const Vec< T, SIMD_WIDTH > &v) |
| Pushes the next Vec to be horizontally accumulated. Does nothing if the horizontal accumulation is already done.
|
|
void | reset () |
| Resets the horizontal accumulation.
|
|
◆ get()
template<class HOp , typename T , size_t SIMD_WIDTH>
Gets the result of the horizontal accumulation. Finishes the horizontal accumulation if it is not done yet.
- Returns
- result of the horizontal accumulation
◆ isDone()
template<class HOp , typename T , size_t SIMD_WIDTH>
bool simd::HAcc< HOp, T, SIMD_WIDTH >::isDone |
( |
| ) |
const |
|
inline |
Checks if the horizontal accumulation is done.
- Returns
- whether the horizontal accumulation is done
◆ isEmpty()
template<class HOp , typename T , size_t SIMD_WIDTH>
bool simd::HAcc< HOp, T, SIMD_WIDTH >::isEmpty |
( |
| ) |
const |
|
inline |
Checks if the horizontal accumulation is empty, i.e. if no Vec has been pushed yet.
- Returns
- whether the horizontal accumulation is empty
◆ push()
template<class HOp , typename T , size_t SIMD_WIDTH>
void simd::HAcc< HOp, T, SIMD_WIDTH >::push |
( |
const Vec< T, SIMD_WIDTH > & | v | ) |
|
|
inline |
Pushes the next Vec to be horizontally accumulated. Does nothing if the horizontal accumulation is already done.
- Parameters
-