Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Namespaces | Functions
var_toys.hpp File Reference

Demonstration reverse-mode helpers built on Var<T>. More...

#include "async_toys.hpp"
#include "var.hpp"
#include <uni20/core/math.hpp>
Include dependency graph for var_toys.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  uni20
 
namespace  uni20::async
 This represents the reverse-mode adjoint for functions of complex variables, assuming a real-valued scalar loss function ( L \colon \mathbb{C} \to \mathbb{R} ).
 

Functions

template<typename T >
Var< T > uni20::async::cos (Var< T > x)
 Computes cos(x) and wires reverse-mode accumulation for the input gradient.
 
template<typename T >
Var< uni20::make_real_t< T > > uni20::async::imag (Var< T > z)
 Computes the imaginary part and propagates gradient to a complex source.
 
template<typename T >
Var< T > uni20::async::operator* (T x, Var< T > y)
 Computes x * y with reverse-mode gradient propagation.
 
template<typename T >
Var< T > uni20::async::operator* (Var< T > x, T y)
 Computes x * y with reverse-mode gradient propagation.
 
template<typename T >
Var< T > uni20::async::operator* (Var< T > x, Var< T > y)
 Computes x * y with reverse-mode gradient propagation.
 
template<typename T >
Var< T > uni20::async::operator+ (T x, Var< T > y)
 Computes x + y with reverse-mode gradient propagation.
 
template<typename T >
Var< T > uni20::async::operator+ (Var< T > x, T y)
 Computes x + y with reverse-mode gradient propagation.
 
template<typename T >
Var< T > uni20::async::operator+ (Var< T > x, Var< T > y)
 Computes x + y with reverse-mode gradient propagation.
 
template<typename T >
Var< T > uni20::async::operator- (T x, Var< T > y)
 Computes x - y with reverse-mode gradient propagation.
 
template<typename T >
Var< T > uni20::async::operator- (Var< T > x, T y)
 Computes x - y with reverse-mode gradient propagation.
 
template<typename T >
Var< T > uni20::async::operator- (Var< T > x, Var< T > y)
 Computes x - y with reverse-mode gradient propagation.
 
template<typename T >
Var< uni20::make_real_t< T > > uni20::async::real (Var< T > z)
 Computes the real part and propagates gradient to a complex source.
 
template<typename T >
Var< T > uni20::async::sin (Var< T > x)
 Computes sin(x) and wires reverse-mode accumulation for the input gradient.
 

Detailed Description

Demonstration reverse-mode helpers built on Var<T>.