ttg 1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
ttg::resumable_task_state Struct Reference

#include <coroutine.h>

Public Types

using handle_type = coroutine_handle< resumable_task_state >
 

Public Member Functions

 resumable_task_state () noexcept=default
 
 resumable_task_state (const resumable_task_state &)=delete
 
resumable_task_stateoperator= (const resumable_task_state &)=delete
 
 resumable_task_state (resumable_task_state &&)=delete
 
resumable_task_stateoperator= (resumable_task_state &&)=delete
 
constexpr bool ready () const
 
constexpr bool completed () const
 
ttg::span< event * > events ()
 
members mandated by the promise_type concept
resumable_task get_return_object ()
 
suspend_never initial_suspend () noexcept
 
suspend_always final_suspend () noexcept
 
void return_void ()
 
void unhandled_exception ()
 

Static Public Attributes

static constexpr std::size_t MaxNumEvents = 20
 

Friends

template<std::size_t N>
struct resumable_task_events
 

Detailed Description

encapsulates the state of the coroutine object visible to the outside world

Note
this is the promise_type for resumable_task coroutine

Definition at line 80 of file coroutine.h.

Member Typedef Documentation

◆ handle_type

Definition at line 89 of file coroutine.h.

Constructor & Destructor Documentation

◆ resumable_task_state() [1/3]

ttg::resumable_task_state::resumable_task_state ( )
defaultnoexcept

◆ resumable_task_state() [2/3]

ttg::resumable_task_state::resumable_task_state ( const resumable_task_state )
delete

◆ resumable_task_state() [3/3]

ttg::resumable_task_state::resumable_task_state ( resumable_task_state &&  )
delete

Member Function Documentation

◆ completed()

constexpr bool ttg::resumable_task_state::completed ( ) const
inlineconstexpr
Returns
true if the task is completed

Definition at line 135 of file coroutine.h.

◆ events()

ttg::span< event * > ttg::resumable_task_state::events ( )
inline

Definition at line 137 of file coroutine.h.

◆ final_suspend()

suspend_always ttg::resumable_task_state::final_suspend ( )
inlinenoexcept
Note
suspend task before destroying it so the runtime can know that the task is completed

Definition at line 100 of file coroutine.h.

◆ get_return_object()

resumable_task ttg::resumable_task_state::get_return_object ( )
inline
Note
start task eagerly

Definition at line 94 of file coroutine.h.

◆ initial_suspend()

suspend_never ttg::resumable_task_state::initial_suspend ( )
inlinenoexcept
Note
start task eagerly

Definition at line 97 of file coroutine.h.

◆ operator=() [1/2]

resumable_task_state & ttg::resumable_task_state::operator= ( const resumable_task_state )
delete

◆ operator=() [2/2]

resumable_task_state & ttg::resumable_task_state::operator= ( resumable_task_state &&  )
delete

◆ ready()

constexpr bool ttg::resumable_task_state::ready ( ) const
inlineconstexpr
Returns
true if ready to resume

Definition at line 128 of file coroutine.h.

◆ return_void()

void ttg::resumable_task_state::return_void ( )
inline
Note
start task eagerly

Definition at line 104 of file coroutine.h.

◆ unhandled_exception()

void ttg::resumable_task_state::unhandled_exception ( )
inline
Note
start task eagerly

Definition at line 105 of file coroutine.h.

Friends And Related Symbol Documentation

◆ resumable_task_events

template<std::size_t N>
friend struct resumable_task_events
friend

Definition at line 145 of file coroutine.h.

Member Data Documentation

◆ MaxNumEvents

constexpr std::size_t ttg::resumable_task_state::MaxNumEvents = 20
inlinestaticconstexpr

Definition at line 88 of file coroutine.h.


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