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

Always-ready awaitable owning an immediate operation value. More...

#include <awaiters.hpp>

Collaboration diagram for uni20::async::ValueAwaiter< T >:
[legend]

Public Types

using value_type = T
 

Public Member Functions

bool await_ready () const noexcept
 Report that the immediate value never suspends.
 
T await_resume () &&noexcept
 Move the value when the awaiter itself is consumed.
 
T const & await_resume () const &noexcept
 Return a borrowed reference when the awaiter is retained.
 
void await_suspend (BasicTask) const noexcept
 No-op suspension hook required by the awaiter protocol.
 
void release () const noexcept
 Match the read-buffer release surface without owning an epoch.
 

Public Attributes

T value
 

Detailed Description

template<typename T>
struct uni20::async::ValueAwaiter< T >

Always-ready awaitable owning an immediate operation value.

This gives immediate values the read-buffer shape expected by async kernels. The value is copied or moved into the coroutine and release() is a no-op.

Member Typedef Documentation

◆ value_type

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

Member Function Documentation

◆ await_ready()

template<typename T >
bool uni20::async::ValueAwaiter< T >::await_ready ( ) const
inlinenoexcept

Report that the immediate value never suspends.

◆ await_resume() [1/2]

template<typename T >
T uni20::async::ValueAwaiter< T >::await_resume ( ) &&
inlinenoexcept

Move the value when the awaiter itself is consumed.

◆ await_resume() [2/2]

template<typename T >
T const & uni20::async::ValueAwaiter< T >::await_resume ( ) const &
inlinenoexcept

Return a borrowed reference when the awaiter is retained.

◆ await_suspend()

template<typename T >
void uni20::async::ValueAwaiter< T >::await_suspend ( BasicTask  ) const
inlinenoexcept

No-op suspension hook required by the awaiter protocol.

◆ release()

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

Match the read-buffer release surface without owning an epoch.

Member Data Documentation

◆ value

template<typename T >
T uni20::async::ValueAwaiter< T >::value

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