codex
Loading...
Searching...
No Matches
coroutines.cpp File Reference
#include <cassert>
#include <condition_variable>
#include <coroutine>
#include <iostream>
#include <new>
#include <queue>
#include <thread>
#include <version>
Include dependency graph for coroutines.cpp:

Classes

struct  base_promise
 
class  thread_pool
 
struct  thread_pool::thread_data
 
class  simple_task
 
struct  simple_task::promise_type
 
struct  task
 
struct  task::promise_type
 
class  continuation
 
class  continuation::promise_type
 

Macros

#define FWD(x)   std::forward<decltype(x)>(x)
 

Functions

void time (auto &&f)
 
simple_task test0_f ()
 
void test0 ()
 
task test1_f (thread_pool *p)
 
void test1 ()
 
continuation test2_f (thread_pool *p, auto f)
 
continuation test2_sc ()
 
task test2_s ()
 
continuation test2_scc (continuation *c, auto &&f)
 
continuation test2_c (continuation *c, auto f)
 
task schedule (thread_pool *p, auto &&f)
 
void test2 ()
 
int main ()
 

Variables

static constexpr std::size_t hardware_destructive_interference_size = 64
 
static constexpr std::size_t N = 1024 * 1024
 
static std::atomic< std::size_t > test1_n = {}
 
static std::atomic< std::size_t > test2_n = {}
 

Macro Definition Documentation

◆ FWD

#define FWD ( x)    std::forward<decltype(x)>(x)

Function Documentation

◆ main()

int main ( void )
Here is the call graph for this function:

◆ schedule()

task schedule ( thread_pool * p,
auto && f )

◆ test0()

void test0 ( )
Here is the call graph for this function:

◆ test0_f()

simple_task test0_f ( )
Here is the caller graph for this function:

◆ test1()

void test1 ( )
Here is the call graph for this function:

◆ test1_f()

task test1_f ( thread_pool * p)
Here is the caller graph for this function:

◆ test2()

void test2 ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test2_c()

continuation test2_c ( continuation * c,
auto f )

◆ test2_f()

continuation test2_f ( thread_pool * p,
auto f )

◆ test2_s()

task test2_s ( )
Here is the caller graph for this function:

◆ test2_sc()

continuation test2_sc ( )
Here is the caller graph for this function:

◆ test2_scc()

continuation test2_scc ( continuation * c,
auto && f )
Here is the caller graph for this function:

◆ time()

void time ( auto && f)
Here is the caller graph for this function:

Variable Documentation

◆ hardware_destructive_interference_size

std::size_t hardware_destructive_interference_size = 64
staticconstexpr

◆ N

std::size_t N = 1024 * 1024
staticconstexpr

◆ test1_n

std::atomic<std::size_t> test1_n = {}
static

◆ test2_n

std::atomic<std::size_t> test2_n = {}
static