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

Async aliases for lazy tensor-level views. More...

#include <uni20/async/async.hpp>
#include <uni20/async/debug_scheduler.hpp>
#include <uni20/tensor/conjugate.hpp>
#include <uni20/tensor/copy.hpp>
#include <uni20/tensor/reshape.hpp>
#include <tuple>
#include <type_traits>
#include <utility>
Include dependency graph for tensor/async.hpp:

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<uni20::TensorView Tensor>
requires uni20::Complex<uni20::tensor_element_t<Tensor>>
auto uni20::async::conj (Async< Tensor > const &tensor)
 Return a lazy conjugating alias of an async complex tensor.
 
template<uni20::TensorView Tensor>
requires (!uni20::Complex<uni20::tensor_element_t<Tensor>>)
auto uni20::async::conj (Async< Tensor > const &tensor)
 Return a lazy read-only identity alias of an async real tensor.
 
template<class InputTensor , std::integral... Extents>
requires OwningTensor<InputTensor> && MutableTensorView<InputTensor> && requires(InputTensor&& input, Extents... extents) { uni20::reshape(std::move(input), extents...); }
auto uni20::reshape (async::Async< InputTensor > &&input, Extents... requested_extents)
 Schedule an owning reshape that consumes an async Tensor value.
 
template<TensorView InputTensor, std::integral... Extents>
requires requires(InputTensor const& input, Extents... extents) { uni20::reshape(input, extents...); }
auto uni20::reshape (async::Async< InputTensor > const &input, Extents... requested_extents)
 Schedule a preserving owning reshape of an async Tensor.
 
template<class Tensor , std::integral... Extents>
requires requires(Tensor& tensor, Extents... extents) { uni20::reshape_inplace(tensor, extents...); }
void uni20::reshape_inplace (async::Async< Tensor > &input, Extents... requested_extents)
 Schedule an in-place mapping change on an async owning Tensor.
 
template<uni20::MutableStridedTensorView Tensor, std::integral... Extents>
requires uni20::detail::CanonicalReshapeLayout<typename uni20::tensor_mdspec_t<Tensor>::layout_type>
auto uni20::async::reshape_view (Async< Tensor > &tensor, Extents... requested_extents)
 Return a mutable structural reshape alias of an async tensor.
 
template<uni20::StridedTensorView Tensor, std::integral... Extents>
requires uni20::detail::CanonicalReshapeLayout<typename uni20::tensor_mdspec_t<Tensor>::layout_type>
auto uni20::async::reshape_view (Async< Tensor > const &tensor, Extents... requested_extents)
 Return a read-only structural reshape alias of an async tensor.
 
template<uni20::MutableStridedTensorView Tensor, std::integral... Extents>
auto uni20::async::reshape_view_left (Async< Tensor > &tensor, Extents... requested_extents)
 Return a mutable column-major structural reshape alias.
 
template<uni20::StridedTensorView Tensor, std::integral... Extents>
auto uni20::async::reshape_view_left (Async< Tensor > const &tensor, Extents... requested_extents)
 Return a read-only column-major structural reshape alias.
 
template<uni20::MutableStridedTensorView Tensor, std::integral... Extents>
auto uni20::async::reshape_view_right (Async< Tensor > &tensor, Extents... requested_extents)
 Return a mutable row-major structural reshape alias.
 
template<uni20::StridedTensorView Tensor, std::integral... Extents>
auto uni20::async::reshape_view_right (Async< Tensor > const &tensor, Extents... requested_extents)
 Return a read-only row-major structural reshape alias.
 

Detailed Description

Async aliases for lazy tensor-level views.