Expression Templates Library (ETL)
Functions
sum.hpp File Reference

Unified vectorized implementation of the "sum" reduction. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename V , typename L >
value_t< L > etl::impl::vec::sum_impl (const L &lhs)
 Vectorized sum computation. More...
 
template<typename V , typename L >
value_t< L > etl::impl::vec::asum_impl (const L &lhs)
 Vectorized absolute sum computation. More...
 
template<typename L >
value_t< L > etl::impl::vec::sum ([[maybe_unused]] const L &lhs)
 Compute the sum of lhs. More...
 
template<typename L >
value_t< L > etl::impl::vec::asum ([[maybe_unused]] const L &lhs)
 Compute the absolute sum of lhs. More...
 

Detailed Description

Unified vectorized implementation of the "sum" reduction.

Function Documentation

◆ asum()

template<typename L >
value_t<L> etl::impl::vec::asum ( [[maybe_unused] ] const L &  lhs)

Compute the absolute sum of lhs.

Parameters
lhsThe lhs expression
Returns
the absolute sum of the elements of lhs

◆ asum_impl()

template<typename V , typename L >
value_t<L> etl::impl::vec::asum_impl ( const L &  lhs)

Vectorized absolute sum computation.

Parameters
lhsThe expression to compute the sum from
Template Parameters
VThe vectorization type
Returns
The absolute sum of the given range

◆ sum()

template<typename L >
value_t<L> etl::impl::vec::sum ( [[maybe_unused] ] const L &  lhs)

Compute the sum of lhs.

Parameters
lhsThe lhs expression
Returns
the sum of the elements of lhs

◆ sum_impl()

template<typename V , typename L >
value_t<L> etl::impl::vec::sum_impl ( const L &  lhs)

Vectorized sum computation.

Parameters
lhsThe expression to compute the sum from
Template Parameters
VThe vectorization type
Returns
The sum of the given range