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

Selector for the "sum" reduction implementations. More...

#include "etl/impl/std/sum.hpp"
#include "etl/impl/vec/sum.hpp"
#include "etl/impl/blas/sum.hpp"
#include "etl/impl/cublas/sum.hpp"
Include dependency graph for sum.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  etl::detail::sum_impl
 Sum operation implementation. More...
 
struct  etl::detail::asum_impl
 Absolute Sum operation implementation. More...
 

Functions

template<typename E >
constexpr etl::sum_impl etl::detail::select_default_sum_impl (bool no_gpu)
 Select the sum implementation for an expression of type E. More...
 
template<typename E >
constexpr etl::sum_impl etl::detail::select_sum_impl ()
 Select the sum implementation for an expression of type E. More...
 

Detailed Description

Selector for the "sum" reduction implementations.

The functions are responsible for selecting the most efficient implementation for each case, based on what is available. The selection of parallel versus serial is also done at this level. The implementation functions should never be used directly, only functions of this header can be used directly.

Note: In a perfect world (full constexpr function and variable templates), the selection should be done with a template parameter in a variable template full sspecialization (alias for each real functions).

Function Documentation

◆ select_default_sum_impl()

template<typename E >
constexpr etl::sum_impl etl::detail::select_default_sum_impl ( bool  no_gpu)

Select the sum implementation for an expression of type E.

This does not consider the local context

Template Parameters
EThe type of expression
Returns
The implementation to use

◆ select_sum_impl()

template<typename E >
constexpr etl::sum_impl etl::detail::select_sum_impl ( )

Select the sum implementation for an expression of type E.

This does not consider the local context

Template Parameters
EThe type of expression
Returns
The implementation to use