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

Owning proxy providing access to writer storage. More...

#include <buffers.hpp>

Public Types

using value_type = shared_storage< T >
 

Public Member Functions

shared_storage< T > & get ()
 Returns mutable access to the underlying shared storage.
 
shared_storage< T > const & get () const
 Returns const access to the underlying shared storage.
 
 operator shared_storage< T > & ()
 
 operator shared_storage< T > const & () const
 
shared_storage< T > * operator-> ()
 
shared_storage< T > const * operator-> () const
 
OwningStorageAccessProxy & operator= (OwningStorageAccessProxy &&) noexcept=delete
 
OwningStorageAccessProxy & operator= (OwningStorageAccessProxy const &)=delete
 
 OwningStorageAccessProxy ()=delete
 
 OwningStorageAccessProxy (OwningStorageAccessProxy &&) noexcept=default
 
 OwningStorageAccessProxy (OwningStorageAccessProxy const &)=delete
 
void release () noexcept
 Release the writer epoch held by this proxy.
 
T take ()
 Move the stored value out of writer storage.
 
T take_release ()
 Move the stored value out and release the writer epoch.
 

Friends

class OwningStorageAwaiter< T >
 

Detailed Description

template<typename T>
class uni20::async::OwningStorageAccessProxy< T >

Owning proxy providing access to writer storage.

Template Parameters
TStored value type.

Member Typedef Documentation

◆ value_type

template<typename T >
using uni20::async::OwningStorageAccessProxy< T >::value_type = shared_storage<T>

Constructor & Destructor Documentation

◆ OwningStorageAccessProxy() [1/3]

template<typename T >
uni20::async::OwningStorageAccessProxy< T >::OwningStorageAccessProxy ( )
delete

◆ OwningStorageAccessProxy() [2/3]

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

◆ OwningStorageAccessProxy() [3/3]

template<typename T >
uni20::async::OwningStorageAccessProxy< T >::OwningStorageAccessProxy ( OwningStorageAccessProxy< T > &&  )
defaultnoexcept

Member Function Documentation

◆ get() [1/2]

template<typename T >
shared_storage< T > & uni20::async::OwningStorageAccessProxy< T >::get ( )
inline

Returns mutable access to the underlying shared storage.

Returns
Reference to writer storage.

◆ get() [2/2]

template<typename T >
shared_storage< T > const & uni20::async::OwningStorageAccessProxy< T >::get ( ) const
inline

Returns const access to the underlying shared storage.

Returns
Const reference to writer storage.

◆ operator shared_storage< T > &()

template<typename T >
uni20::async::OwningStorageAccessProxy< T >::operator shared_storage< T > & ( )
inline

◆ operator shared_storage< T > const &()

template<typename T >
uni20::async::OwningStorageAccessProxy< T >::operator shared_storage< T > const & ( ) const
inline

◆ operator->() [1/2]

template<typename T >
shared_storage< T > * uni20::async::OwningStorageAccessProxy< T >::operator-> ( )
inline

◆ operator->() [2/2]

template<typename T >
shared_storage< T > const * uni20::async::OwningStorageAccessProxy< T >::operator-> ( ) const
inline

◆ operator=() [1/2]

template<typename T >
OwningStorageAccessProxy & uni20::async::OwningStorageAccessProxy< T >::operator= ( OwningStorageAccessProxy< T > &&  )
deletenoexcept

◆ operator=() [2/2]

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

◆ release()

template<typename T >
void uni20::async::OwningStorageAccessProxy< T >::release ( )
inlinenoexcept

Release the writer epoch held by this proxy.

◆ take()

template<typename T >
T uni20::async::OwningStorageAccessProxy< T >::take ( )
inline

Move the stored value out of writer storage.

Returns
Moved value.

◆ take_release()

template<typename T >
T uni20::async::OwningStorageAccessProxy< T >::take_release ( )
inline

Move the stored value out and release the writer epoch.

Returns
Moved value.

Friends And Related Symbol Documentation

◆ OwningStorageAwaiter< T >

template<typename T >
friend class OwningStorageAwaiter< T >
friend

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