-
-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
6311: Adding executor parallel invoke CPOs r=hkaiser a=hkaiser This adds new CPOs: `sync_invoke` and `async_invoke`. It also adds an implementation for the `fork_join_executor` and `block_fork_join_executor` as well as fallback implementations for all executors not supporting these. The APIs are: ``` namespace hpx::parallel::execution { template <typename Executor, typename F, typename... Fs, HPX_CONCEPT_REQUIRES_( std::is_invocable_v<F> && (std::is_invocable_v<Fs> && ...) )> void sync_invoke(Executor&& exec, F&& f, Fs&&... fs); template <typename Executor, typename F, typename... Fs, HPX_CONCEPT_REQUIRES_( std::is_invocable_v<F> && (std::is_invocable_v<Fs> && ...) )> decltype(auto) async_invoke(Executor&& exec, F&& f, Fs&&... fs); } ``` For executors supporting the CPOs this will concurrently launch the given functions and will either wait for them to complete or return a completion token (e.g., a `hpx::future`) representing the completion of the function invocations. Co-authored-by: Hartmut Kaiser <[email protected]>
- Loading branch information
Showing
9 changed files
with
879 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.