Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.68 KB

File metadata and controls

35 lines (22 loc) · 1.68 KB

WP 1.7 Coroutine Tests

These are some (largely) independent tests with coroutines for the task scheduling studies in Work Package 1.7.

This project isn't intended as a coroutine support library. If you're looking for a fully-fledged coroutine library, consider using cppcoro, libcoro or concurrencpp. For composing asynchronous operations across libraries, consider using either std::execution (senders/receivers, with reference implementation Nvidia/stdexec or bemanproject/execution) or IoAwaitables protocol (p4003, with reference implementation Boost.Capy).

Getting started

The project requires a C++20 compiler with coroutine support.

To build the project run:

cmake --workflow --preset 20

Building the examples using std::generator or beman.task requires C++23 standard:

cmake --workflow --preset 23

The 20-cuda and 23-cuda presets can be used to enable building examples using CUDA (version of CUDA used must support given C++ standard).

Then run the examples, for instance:

./build/examples/generator

Development

To make experimentation easier, a skeleton coroutine is provided that includes most of the boilerplate code and can be copied and completed with your own implementation.