Tannic
A C++ Tensor Library
Loading...
Searching...
No Matches
tannic::expression::Reduction< Reducer, Operand > Class Template Reference

Lazy reduction expression. More...

#include <reductions.hpp>

Public Member Functions

constexpr Reduction (Reducer reducer, typename Trait< Operand >::Reference operand)
 
constexpr type dtype () const
 
constexpr Shape const & shape () const
 
constexpr Strides const & strides () const
 
std::ptrdiff_t offset () const
 
Tensor forward () const
 

Public Attributes

Reducer reducer
 
Trait< Operand >::Reference operand
 

Detailed Description

template<class Reducer, Expression Operand>
class tannic::expression::Reduction< Reducer, Operand >

Lazy reduction expression.

Represents reductions like sum, max, or mean that collapse tensors along an axis. Output shape/dtype are determined by the Reducer's rules.

Template Parameters
ReducerPolicy defining the reduction (e.g., Argmax).
OperandInput satisfying the Expression concept..

Constructor & Destructor Documentation

◆ Reduction()

template<class Reducer , Expression Operand>
constexpr tannic::expression::Reduction< Reducer, Operand >::Reduction ( Reducer  reducer,
typename Trait< Operand >::Reference  operand 
)
inlineconstexpr

Member Function Documentation

◆ dtype()

template<class Reducer , Expression Operand>
constexpr type tannic::expression::Reduction< Reducer, Operand >::dtype ( ) const
inlineconstexpr

◆ forward()

template<class Reducer , Expression Operand>
Tensor tannic::expression::Reduction< Reducer, Operand >::forward ( ) const
inline

◆ offset()

template<class Reducer , Expression Operand>
std::ptrdiff_t tannic::expression::Reduction< Reducer, Operand >::offset ( ) const
inline

◆ shape()

template<class Reducer , Expression Operand>
constexpr Shape const & tannic::expression::Reduction< Reducer, Operand >::shape ( ) const
inlineconstexpr

◆ strides()

template<class Reducer , Expression Operand>
constexpr Strides const & tannic::expression::Reduction< Reducer, Operand >::strides ( ) const
inlineconstexpr

Member Data Documentation

◆ operand

template<class Reducer , Expression Operand>
Trait<Operand>::Reference tannic::expression::Reduction< Reducer, Operand >::operand

◆ reducer

template<class Reducer , Expression Operand>
Reducer tannic::expression::Reduction< Reducer, Operand >::reducer

The documentation for this class was generated from the following file: