pika-org / pika

pika is a C++ tasking library built on std::execution with fibers, CUDA, HIP, and MPI support.
https://pikacpp.org
Boost Software License 1.0
63 stars 10 forks source link

Convert `std::execution` functionality to use member functions instead of `tag_invoke` #1204

Open msimberg opened 3 months ago

msimberg commented 3 months ago

Later versions of stdexec support both tag_invoke and member functions, but the standard will use member functions only. We should try to migrate to use member functions only where it makes sense with reasonable backwards compatibility to the old C++17 implementation in pika.

The following CPOs and customizations can be translated quite simply:

Sender adaptor customization we currently still do with tag_invoke, but this is not an as straightforward translation. E.g. tag_invoke(bulk_t, thread_pool_scheduler, ...) would need to be translated to transform_sender(thread_pool_scheduler_domain, bulk_sender). We don't have domains implemented for schedulers yet, so we'd need that before tackling this.