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

Reference-counted optional in-place storage used by async buffers. More...

#include <atomic>
#include <concepts>
#include <cstddef>
#include <memory>
#include <new>
#include <type_traits>
#include <uni20/common/trace.hpp>
#include <utility>
Include dependency graph for shared_storage.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  uni20::async::shared_storage< T >
 A lightweight, thread-safe, reference-counted storage for a single object. More...
 

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 , typename... Args>
shared_storage< T > uni20::async::make_shared_storage (Args &&... args)
 Create a new shared_storage<T> with T(args...) in-place.
 
template<typename T , typename Owner , typename... Args>
shared_storage< T > uni20::async::make_shared_storage_alias (shared_storage< Owner > const &owner, Args &&... args)
 Create storage for a value that keeps another storage value alive.
 
template<typename T >
shared_storage< T > uni20::async::make_unconstructed_shared_storage ()
 Create a new shared_storage<T> with an unconstructed T.
 

Detailed Description

Reference-counted optional in-place storage used by async buffers.