Skip to content

Commit 49b7122

Browse files
author
Sai Charan
committed
fixing minor errrors
1 parent cae2eb4 commit 49b7122

4 files changed

Lines changed: 17 additions & 7 deletions

File tree

libs/core/executors/include/hpx/executors/scheduler_executor.hpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ namespace hpx::execution::experimental {
198198
}
199199

200200
// BulkTwoWayExecutor interface
201+
#if defined(HPX_HAVE_STDEXEC)
201202
// clang-format off
202203
template <typename F, typename S, typename... Ts,
203204
HPX_CONCEPT_REQUIRES_(
@@ -214,7 +215,7 @@ namespace hpx::execution::experimental {
214215

215216
if constexpr (std::is_void_v<result_type>)
216217
{
217-
return make_future(bulk(schedule(exec.sched_), shape,
218+
return make_future(bulk(schedule(exec.sched_), stdexec::par, shape,
218219
hpx::bind_back(HPX_FORWARD(F, f), HPX_FORWARD(Ts, ts)...)));
219220
}
220221
else
@@ -253,12 +254,14 @@ namespace hpx::execution::experimental {
253254
start_detached(
254255
bulk(transfer_just(exec.sched_, HPX_MOVE(promises),
255256
HPX_FORWARD(F, f), shape, HPX_FORWARD(Ts, ts)...),
256-
n, HPX_MOVE(f_helper)));
257+
stdexec::par, n, HPX_MOVE(f_helper)));
257258

258259
return results;
259260
}
260261
}
262+
#endif
261263

264+
#if defined(HPX_HAVE_STDEXEC)
262265
// clang-format off
263266
template <typename F, typename S, typename... Ts,
264267
HPX_CONCEPT_REQUIRES_(
@@ -270,10 +273,12 @@ namespace hpx::execution::experimental {
270273
scheduler_executor const& exec, F&& f, S const& shape, Ts&&... ts)
271274
{
272275
hpx::this_thread::experimental::sync_wait(
273-
bulk(schedule(exec.sched_), shape,
276+
bulk(schedule(exec.sched_), stdexec::par, shape,
274277
hpx::bind_back(HPX_FORWARD(F, f), HPX_FORWARD(Ts, ts)...)));
275278
}
279+
#endif
276280

281+
#if defined(HPX_HAVE_STDEXEC)
277282
// clang-format off
278283
template <typename F, typename S, typename Future, typename... Ts,
279284
HPX_CONCEPT_REQUIRES_(
@@ -295,8 +300,8 @@ namespace hpx::execution::experimental {
295300
auto pre_req =
296301
when_all(keep_future(HPX_FORWARD(Future, predecessor)));
297302

298-
auto loop = bulk(transfer(HPX_MOVE(pre_req), exec.sched_),
299-
shape,
303+
auto loop = bulk(continues_on(HPX_MOVE(pre_req), exec.sched_),
304+
stdexec::par, shape,
300305
hpx::bind_back(HPX_FORWARD(F, f), HPX_FORWARD(Ts, ts)...));
301306

302307
return make_future(HPX_MOVE(loop));
@@ -309,7 +314,7 @@ namespace hpx::execution::experimental {
309314
just(std::vector<result_type>(hpx::util::size(shape))));
310315

311316
auto loop =
312-
bulk(transfer(HPX_MOVE(pre_req), exec.sched_), shape,
317+
bulk(continues_on(HPX_MOVE(pre_req), exec.sched_), stdexec::par, shape,
313318
detail::captured_args_then(
314319
HPX_FORWARD(F, f), HPX_FORWARD(Ts, ts)...));
315320

@@ -319,6 +324,7 @@ namespace hpx::execution::experimental {
319324
}));
320325
}
321326
}
327+
#endif
322328

323329
private:
324330
std::decay_t<BaseScheduler> sched_;

libs/core/executors/include/hpx/executors/thread_pool_scheduler.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ namespace hpx::execution::experimental {
438438
#endif
439439
};
440440

441+
#if defined(HPX_HAVE_STDEXEC)
441442
friend constexpr hpx::execution::experimental::
442443
forward_progress_guarantee
443444
tag_invoke(
@@ -455,6 +456,7 @@ namespace hpx::execution::experimental {
455456
forward_progress_guarantee::concurrent;
456457
}
457458
}
459+
#endif
458460

459461
friend constexpr sender<thread_pool_policy_scheduler> tag_invoke(
460462
hpx::execution::experimental::schedule_t,

libs/core/executors/include/hpx/executors/thread_pool_scheduler_bulk.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ namespace hpx::execution::experimental::detail {
786786
hpx::util::cache_aligned_data<std::atomic<std::size_t>>
787787
tasks_remaining;
788788

789-
using value_types = value_types_of_t<Sender, empty_env,
789+
using value_types = value_types_of_t<Sender, stdexec::env<>,
790790
decayed_tuple, hpx::variant>;
791791
hpx::util::detail::prepend_t<value_types, hpx::monostate> ts;
792792
std::atomic<bool> bad_alloc_thrown{false};

libs/core/executors/tests/regressions/bulk_sync_wait.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace tt = hpx::this_thread::experimental;
1717

1818
int hpx_main()
1919
{
20+
#if defined(HPX_HAVE_STDEXEC)
2021
std::atomic<bool> called = false;
2122

2223
ex::thread_pool_scheduler sch{};
@@ -27,6 +28,7 @@ int hpx_main()
2728
tt::sync_wait(s);
2829

2930
HPX_TEST(called.load());
31+
#endif
3032

3133
return hpx::local::finalize();
3234
}

0 commit comments

Comments
 (0)