Skip to content

Commit 70c4501

Browse files
author
Hackathon User
committed
Refactor executor headers: Remove legacy !HPX_HAVE_STDEXEC blocks and replace heavy scheduler includes with forward declarations
1 parent aaf00f3 commit 70c4501

3 files changed

Lines changed: 9 additions & 50 deletions

File tree

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

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
#include <hpx/config.hpp>
1010

11-
#if defined(HPX_HAVE_STDEXEC)
1211
#include <hpx/execution_base/stdexec_forward.hpp>
13-
#endif
1412

1513
#include <hpx/execution/algorithms/bulk.hpp>
1614
#include <hpx/execution_base/completion_scheduler.hpp>
@@ -80,7 +78,6 @@ namespace hpx::execution::experimental {
8078
HPX_NO_UNIQUE_ADDRESS std::decay_t<Shape> shape_;
8179
HPX_NO_UNIQUE_ADDRESS std::decay_t<F> f_;
8280

83-
#if defined(HPX_HAVE_STDEXEC)
8481
using sender_concept = hpx::execution::experimental::sender_t;
8582

8683
template <typename Env>
@@ -131,48 +128,6 @@ namespace hpx::execution::experimental {
131128
{
132129
return env{s.sender_, s.exec_};
133130
}
134-
#else
135-
template <typename Env>
136-
struct generate_completion_signatures
137-
{
138-
template <template <typename...> typename Tuple,
139-
template <typename...> typename Variant>
140-
using value_types =
141-
value_types_of_t<Sender, Env, Tuple, Variant>;
142-
143-
template <template <typename...> typename Variant>
144-
using error_types = hpx::util::detail::unique_concat_t<
145-
error_types_of_t<Sender, Env, Variant>,
146-
Variant<std::exception_ptr>>;
147-
148-
static constexpr bool sends_stopped =
149-
sends_stopped_of_v<Sender, Env>;
150-
};
151-
152-
template <typename Env>
153-
friend auto tag_invoke(
154-
hpx::execution::experimental::get_completion_signatures_t,
155-
executor_bulk_sender const&, Env)
156-
-> generate_completion_signatures<Env>;
157-
158-
template <typename CPO>
159-
friend constexpr auto tag_invoke(
160-
hpx::execution::experimental::get_completion_scheduler_t<CPO>
161-
tag,
162-
executor_bulk_sender const& s)
163-
{
164-
return tag(s.sender_);
165-
}
166-
167-
friend constexpr auto tag_invoke(
168-
hpx::execution::experimental::get_completion_scheduler_t<
169-
hpx::execution::experimental::set_value_t>,
170-
executor_bulk_sender const& s)
171-
{
172-
return hpx::execution::experimental::executor_scheduler<
173-
Executor>{s.exec_};
174-
}
175-
#endif
176131

177132
template <typename Receiver>
178133
friend auto tag_invoke(connect_t,

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010

1111
#include <hpx/config.hpp>
1212
#include <hpx/assert.hpp>
13-
#include <hpx/execution/queries/get_scheduler.hpp>
13+
namespace hpx::execution::experimental {
14+
template <typename Executor>
15+
struct executor_scheduler;
16+
}
17+
1418
#include <hpx/executors/detail/hierarchical_spawning.hpp>
1519
#include <hpx/executors/detail/index_queue_spawning.hpp>
1620
#include <hpx/executors/execution_policy_mappings.hpp>
17-
#include <hpx/executors/executor_scheduler.hpp>
18-
#include <hpx/executors/executor_scheduler_bulk.hpp>
1921
#include <hpx/modules/allocator_support.hpp>
2022
#include <hpx/modules/async_base.hpp>
2123
#include <hpx/modules/concepts.hpp>

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010

1111
#include <hpx/config.hpp>
1212
#include <hpx/executors/execution_policy_mappings.hpp>
13-
#include <hpx/executors/executor_scheduler.hpp>
14-
#include <hpx/executors/executor_scheduler_bulk.hpp>
13+
namespace hpx::execution::experimental {
14+
template <typename Executor>
15+
struct executor_scheduler;
16+
}
1517
#include <hpx/executors/parallel_executor.hpp>
1618
#include <hpx/modules/errors.hpp>
1719
#include <hpx/modules/execution.hpp>

0 commit comments

Comments
 (0)