Skip to content

Reducer

#include <reductions.hh>
template<typename T, typename Traits>
struct Reducer

Defined in src/lib/ncarray/reductions.hh:605

A wrapping class for reduction traits.

The Reducer templates on the various reduction traits binding the static functions into an instantiable struct. In some cases, it may be preferable to pass an object to perform the reductions, where passing the static functions, or lambdas wrapping them, may be less ideal, or impossible.

Name Kind Owner
identity function Declared here
transform function Declared here
reduce function Declared here
store function Declared here
atomic function Declared here
dual_atomic function Declared here
AccumT typedef Declared here
OutT typedef Declared here
Return Name Description
NCA_HDAccumT identity const inline
NCA_HDAccumT transform const inline
NCA_HDAccumT reduce const inline
NCA_HD auto store const inline
NCA_HD void atomic inline
NCA_HD void dual_atomic inline

const inline

inline NCA_HDAccumT identity() const

Defined in src/lib/ncarray/reductions.hh:609


const inline

inline NCA_HDAccumT transform(ssize_t idx, T val) const

Defined in src/lib/ncarray/reductions.hh:613


const inline

inline NCA_HDAccumT reduce(AccumT a, AccumT b) const

Defined in src/lib/ncarray/reductions.hh:617


const inline

inline NCA_HD auto store(AccumT val, double ddof = 0.0) const

Defined in src/lib/ncarray/reductions.hh:621


inline

inline NCA_HD void atomic(AccumT * dest, AccumT val)

Defined in src/lib/ncarray/reductions.hh:625


inline

inline NCA_HD void dual_atomic(AccumT * scratch, AccumT val, OutT * res, double ddof = 0.0)

Defined in src/lib/ncarray/reductions.hh:631

Name Description
AccumT
OutT

using AccumT = typename Traits::template AccumT< T >

Defined in src/lib/ncarray/reductions.hh:606


using OutT = typename Traits::template OutT< T >

Defined in src/lib/ncarray/reductions.hh:607