Skip to content

Commit

Permalink
switch to official P2300 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkshoop committed Jun 12, 2022
1 parent 134ff6b commit d86497d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
url = https://github.com/oneapi-src/oneTBB.git
[submodule "wg21_p2300_std_execution"]
path = external/wg21_p2300_std_execution
url = https://github.com/lums658/wg21_p2300_std_execution.git
branch = async_scope
url = https://github.com/brycelelbach/wg21_p2300_std_execution.git
branch = main

2 changes: 1 addition & 1 deletion external/wg21_p2300_std_execution
8 changes: 5 additions & 3 deletions sieve/sieve_p2300_fun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

#include "../examples/schedulers/static_thread_pool.hpp"

#include "async_scope.hpp"

using namespace std::execution;
namespace ex = std::execution;

Expand Down Expand Up @@ -97,15 +99,15 @@ auto sieve_p2300_block(size_t n, size_t block_size) {
std::this_thread::sync_wait(std::move(d));
}
#else
ex::async_scope scope;
ex::P2519::async_scope scope;

/* launch tasks on async_scope */
for (size_t i = 0; i < n / block_size + 1; ++i) {
scope.spawn_on(pool.get_scheduler(), make_snd());
scope.spawn(ex::on(pool.get_scheduler(), make_snd()));
}

/* wait for tasks to finish */
std::this_thread::sync_wait(scope.complete());
std::this_thread::sync_wait(scope.empty());

#endif

Expand Down

0 comments on commit d86497d

Please sign in to comment.