Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
uni20::async::Var< T > Class Template Reference

#include <var.hpp>

Public Types

using value_type = T
 

Public Member Functions

Async< T > & backprop () &
 Finalize reverse propagation and return the gradient channel.
 
Async< T > backprop () &&
 Finalize reverse propagation and move out the gradient channel.
 
Async< T > const & backprop () const &
 Finalize reverse propagation and return the gradient channel.
 
Var & operator= (Var &&)=default
 
Var & operator= (Var &other)
 
Var & operator= (Var const &)=delete
 
 Var ()=default
 
 Var (Async< T > const &other)
 
template<typename U >
requires std::convertible_to<U, T>
 Var (U &&val)
 Constructs with a copy of an initial value that can be implicitly converted to T.
 
 Var (Var &&)=default
 
 Var (Var &other)
 
 Var (Var const &)=delete
 Disable ordinary copying (Vars are never copied in the normal sense).
 

Public Attributes

ReverseValue< T > grad
 
Async< T > value
 

Member Typedef Documentation

◆ value_type

template<typename T >
using uni20::async::Var< T >::value_type = T

Constructor & Destructor Documentation

◆ Var() [1/6]

template<typename T >
uni20::async::Var< T >::Var ( )
default

◆ Var() [2/6]

template<typename T >
uni20::async::Var< T >::Var ( Var< T > &&  )
default

◆ Var() [3/6]

template<typename T >
uni20::async::Var< T >::Var ( Var< T > const &  )
delete

Disable ordinary copying (Vars are never copied in the normal sense).

◆ Var() [4/6]

template<typename T >
uni20::async::Var< T >::Var ( Var< T > &  other)
inline

◆ Var() [5/6]

template<typename T >
uni20::async::Var< T >::Var ( Async< T > const &  other)
inline

◆ Var() [6/6]

template<typename T >
template<typename U >
requires std::convertible_to<U, T>
uni20::async::Var< T >::Var ( U &&  val)
inline

Constructs with a copy of an initial value that can be implicitly converted to T.

Member Function Documentation

◆ backprop() [1/3]

template<typename T >
Async< T > & uni20::async::Var< T >::backprop ( ) &
inline

Finalize reverse propagation and return the gradient channel.

Returns
Reference to the finalized gradient Async<T>.

◆ backprop() [2/3]

template<typename T >
Async< T > uni20::async::Var< T >::backprop ( ) &&
inline

Finalize reverse propagation and move out the gradient channel.

Returns
Finalized gradient Async<T>.

◆ backprop() [3/3]

template<typename T >
Async< T > const & uni20::async::Var< T >::backprop ( ) const &
inline

Finalize reverse propagation and return the gradient channel.

Returns
Const reference to the finalized gradient Async<T>.

◆ operator=() [1/3]

template<typename T >
Var & uni20::async::Var< T >::operator= ( Var< T > &&  )
default

◆ operator=() [2/3]

template<typename T >
Var & uni20::async::Var< T >::operator= ( Var< T > &  other)
inline

◆ operator=() [3/3]

template<typename T >
Var & uni20::async::Var< T >::operator= ( Var< T > const &  )
delete

Member Data Documentation

◆ grad

template<typename T >
ReverseValue<T> uni20::async::Var< T >::grad

◆ value

template<typename T >
Async<T> uni20::async::Var< T >::value

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