Skip to content

Commit 38ecfb0

Browse files
committed
Merge remote-tracking branch 'origin/master' into release
2 parents 186005a + d4a820b commit 38ecfb0

File tree

91 files changed

+155
-8724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+155
-8724
lines changed

CMakeLists.txt

+5-35
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,12 @@ if(HPX_WITH_CUDA)
333333
string(APPEND HPX_CUDA_CLANG_FLAGS " --cuda-gpu-arch=${arch}")
334334
endforeach()
335335
string(REGEX REPLACE ";" " " HPX_WITH_CUDA_ARCH_INFO "${HPX_WITH_CUDA_ARCH}")
336-
else()
337-
set(HPX_TLL_PUBLIC "PUBLIC") # keywords for target_link_libraries
338-
set(HPX_TLL_PRIVATE "PRIVATE")
336+
# keywords for target_link_libraries (cuda)
337+
set(CUDA_LINK_LIBRARIES_KEYWORD "PRIVATE")
339338
endif()
339+
# keywords for target_link_libraries (hpx)
340+
set(HPX_TLL_PUBLIC "PUBLIC")
341+
set(HPX_TLL_PRIVATE "PRIVATE")
340342
if(HPX_WITH_CUDA_CLANG AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
341343
hpx_error("To use Cuda Clang, please select Clang as your default C++ compiler")
342344
endif()
@@ -956,38 +958,6 @@ if(HPX_WITH_TUPLE_RVALUE_SWAP)
956958
hpx_add_config_define(HPX_HAVE_TUPLE_RVALUE_SWAP)
957959
endif()
958960

959-
# HPX_WITH_BOOST_CHRONO_COMPATIBILITY: introduced in V1.0.0
960-
hpx_option(HPX_WITH_BOOST_CHRONO_COMPATIBILITY BOOL
961-
"Enable support for boost::chrono (default: OFF)"
962-
OFF ADVANCED)
963-
if(HPX_WITH_BOOST_CHRONO_COMPATIBILITY)
964-
hpx_add_config_define(HPX_HAVE_BOOST_CHRONO_COMPATIBILITY)
965-
endif()
966-
967-
# HPX_WITH_EXECUTOR_COMPATIBILITY: introduced in V1.0.0
968-
hpx_option(HPX_WITH_EXECUTOR_COMPATIBILITY BOOL
969-
"Enable old (pre-concurrency TS) executor API (default: OFF)"
970-
OFF ADVANCED)
971-
if(HPX_WITH_EXECUTOR_COMPATIBILITY)
972-
hpx_add_config_define(HPX_HAVE_EXECUTOR_COMPATIBILITY)
973-
endif()
974-
975-
# HPX_WITH_EXECUTION_POLICY_COMPATIBILITY: introduced in V1.0.0
976-
hpx_option(HPX_WITH_EXECUTION_POLICY_COMPATIBILITY BOOL
977-
"Enable old execution policy names in API (default: OFF)"
978-
OFF ADVANCED)
979-
if(HPX_WITH_EXECUTION_POLICY_COMPATIBILITY)
980-
hpx_add_config_define(HPX_HAVE_EXECUTION_POLICY_COMPATIBILITY)
981-
endif()
982-
983-
# HPX_WITH_TRANSFORM_REDUCE_COMPATIBILITY: introduced in V1.0.0
984-
hpx_option(HPX_WITH_TRANSFORM_REDUCE_COMPATIBILITY BOOL
985-
"Enable old overloads for transform_reduce and inner_product (default: OFF)"
986-
OFF ADVANCED)
987-
if(HPX_WITH_TRANSFORM_REDUCE_COMPATIBILITY)
988-
hpx_add_config_define(HPX_HAVE_TRANSFORM_REDUCE_COMPATIBILITY)
989-
endif()
990-
991961
# HPX_WITH_INCLUSIVE_SCAN_COMPATIBILITY: introduced in V1.1.0
992962
hpx_option(HPX_WITH_INCLUSIVE_SCAN_COMPATIBILITY BOOL
993963
"Enable old overloads for inclusive_scan (default: ON)"

cmake/HPX_SetupBoost.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if(HPX_WITH_THREAD_COMPATIBILITY OR NOT(HPX_WITH_CXX11_THREAD))
3434
set(__boost_need_thread ON)
3535
endif()
3636

37-
if(HPX_WITH_BOOST_CHRONO_COMPATIBILITY OR __boost_need_thread)
37+
if(__boost_need_thread)
3838
set(__boost_libraries ${__boost_libraries} chrono)
3939
endif()
4040

docs/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ set(doxygen_dependencies
103103
"${PROJECT_SOURCE_DIR}/hpx/parallel/executors/service_executors.hpp"
104104
"${PROJECT_SOURCE_DIR}/hpx/parallel/executors/static_chunk_size.hpp"
105105
"${PROJECT_SOURCE_DIR}/hpx/parallel/executors/thread_pool_executors.hpp"
106-
"${PROJECT_SOURCE_DIR}/hpx/parallel/executors/v1/timed_executor_traits.hpp"
107106
"${PROJECT_SOURCE_DIR}/hpx/performance_counters/manage_counter_type.hpp"
108107
"${PROJECT_SOURCE_DIR}/hpx/runtime_fwd.hpp"
109108
"${PROJECT_SOURCE_DIR}/hpx/runtime/applier_fwd.hpp"

docs/sphinx/manual/writing_single_node_hpx_applications.rst

+4-109
Original file line numberDiff line numberDiff line change
@@ -790,120 +790,15 @@ Parallel algorithms
790790
* Implements loop functionality over a range specified by integral or iterator bounds.
791791
* ``<hpx/include/parallel_for_loop.hpp>``
792792

793-
.. _executors:
794-
795-
Executors and executor traits
796-
=============================
797-
798-
The existing Version 1 of the Parallelism TS (|cpp11_n4104|_) exposes parallel
799-
execution to the programmer in the form of standard algorithms that accept
800-
execution policies. A companion executor facility both provides a suitable
801-
substrate for implementing these algorithms in a standard way and provide a
802-
mechanism for exercising programmatic control over where parallel work should be
803-
executed.
804-
805-
The algorithms and execution policies specified by the Parallelism TS are
806-
designed to permit implementation on the broadest range of platforms. In
807-
addition to preemptive thread pools common on some platforms, implementations of
808-
these algorithms may want to take advantage of a number of mechanisms for
809-
parallel execution, including cooperative fibers, GPU threads, and SIMD vector
810-
units, among others. This diversity of possible execution resources strongly
811-
suggests that a suitable abstraction encapsulating the details of how work is
812-
created across diverse platforms would be of significant value to parallel
813-
algorithm implementations. Suitably defined executors provide just such a
814-
facility.
815-
816-
An executor is an object responsible for creating execution agents on which work
817-
is performed, thus abstracting the (potentially platform-specific) mechanisms
818-
for launching work. To accommodate the goals of the Parallelism TS, whose
819-
algorithms aim to support the broadest range of possible platforms, the
820-
requirements that all executors are expected to fulfill are small. They are also
821-
consistent with a broad range of execution semantics, including preemptive
822-
threads, cooperative fibers, GPU threads, and SIMD vector units, among others.
823-
824-
The executors implemented by |hpx| are aligned with the interfaces proposed by
825-
|cpp11_n4406|_ (Parallel Algorithms Need Executors).
826-
827-
Executors are modular components for requisitioning execution agents. During
828-
parallel algorithm execution, execution policies generate execution agents by
829-
requesting their creation from an associated executor. Rather than focusing on
830-
asynchronous task queuing, our complementary treatment of executors casts them
831-
as modular components for invoking functions over the points of an index space.
832-
We believe that executors may be conceived of as allocators for execution agents
833-
and our interface's design reflects this analogy. The process of requesting
834-
agents from an executor is mediated via the
835-
:cpp:class:`hpx::parallel::executor_traits` API, which is analogous to the
836-
interaction between containers and allocator_traits.
837-
838-
With ``executor_traits`` clients manipulate all types of executors uniformly::
839-
840-
executor_traits<my_executor_t>::execute(my_executor,
841-
[](size_t i){ // perform task i },
842-
range(0, n));
843-
844-
This call synchronously creates a group of invocations of the given function,
845-
where each individual invocation within the group is identified by a unique
846-
integer ``i`` in ``[0, n)`` Other functions in the interface exist to create
847-
groups of invocations asynchronously and support the special case of creating a
848-
singleton group, resulting in four different combinations.
849-
850-
Though this interface appears to require executor authors to implement four
851-
different basic operations, there is really only one requirement:
852-
``async_execute()``. In practice, the other operations may be defined in terms
853-
of this single basic primitive. However, some executors will naturally
854-
specialize all four operations for maximum efficiency.
855-
856-
For maximum implementation flexibility, ``executor_traits`` does not require
857-
executors to implement a particular exception reporting mechanism. Executors may
858-
choose whether or not to report exceptions, and if so, in what manner they are
859-
communicated back to the caller. However, all executors in |hpx| report
860-
exceptions in a manner consistent with the behavior of execution policies
861-
described by the Parallelism TS, where multiple exceptions are collected into an
862-
__exception_list__. This list is reported through ``async_execute()`` s returned
863-
future, or thrown directly by ``execute()``.
864-
865-
.. note::
866-
867-
Please note that the executor interface as described above has now been
868-
deprecated. It has been replaced by separate executor customization points,
869-
one for each of the exposed functions. Please see __cpp20_p0443__ for more
870-
details. The old interface based on ``executor_traits`` will be supported for
871-
some time, you might have to enable the ``HPX_WITH_EXECUTOR_COMPATIBILITY``
872-
configuration setting, however.
873-
874-
In |hpx| we have implemented the following executor types:
875-
876-
* :cpp:class:`hpx::parallel::execution::sequenced_executor`: creates groups of
877-
sequential execution agents which execute in the calling thread. The
878-
sequential order is given by the lexicographical order of indices in the index
879-
space.
880-
* :cpp:class:`hpx::parallel::execution::parallel_executor`: creates groups of
881-
parallel execution agents which execute in threads implicitly created by the
882-
executor. This executor uses a given launch policy.
883-
* :cpp:class:`hpx::parallel::execution::service_executor`: creates groups of
884-
parallel execution agents which execute in one of the kernel threads
885-
associated with a given pool category (I/O, :term:`parcel`, or timer pool, or
886-
on the main thread of the application).
887-
* :cpp:class:`hpx::parallel::execution::local_priority_queue_executor`,
888-
:cpp:class:`hpx::parallel::execution::local_queue_executor`,
889-
:cpp:class:`hpx::parallel::execution::static_priority_queue_executor` create
890-
executors on top of the corresponding |hpx| schedulers.
891-
* :cpp:class:`hpx::parallel::execution::distribution_policy_executor` creates
892-
executors using any of the existing distribution policies (like
893-
:cpp:class:`hpx::components::colocating_distribution_policy` et.al.).
894-
895793
.. _executor_parameters:
896794

897795
Executor parameters and executor parameter traits
898796
-------------------------------------------------
899797

900-
Executors as described in the previous section add a powerful customization
901-
capability to any facility which exposes management of parallel execution.
902-
However, sometimes it is necessary to be able to customize certain parameters of
903-
the execution as well. In |hpx| we introduce the notion of execution parameters
904-
and execution parameter traits. At this point, the only parameter which can be
905-
customized is the size of the chunks of work executed on a single |hpx|-thread
906-
(such as the number of loop iterations combined to run as a single task).
798+
In |hpx| we introduce the notion of execution parameters and execution parameter
799+
traits. At this point, the only parameter which can be customized is the size of
800+
the chunks of work executed on a single |hpx|-thread (such as the number of loop
801+
iterations combined to run as a single task).
907802

908803
An executor parameter object is responsible for exposing the calculation of the
909804
size of the chunks scheduled. It abstracts the (potential platform-specific)

hpx/apply.hpp

-27
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
#include <hpx/util/deferred_call.hpp>
2020
#include <hpx/util/thread_description.hpp>
2121

22-
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
23-
#include <hpx/traits/v1/is_executor.hpp>
24-
#include <hpx/parallel/executors/v1/executor_traits.hpp>
25-
#endif
2622
#include <hpx/parallel/executors/execution.hpp>
2723
#include <hpx/parallel/executors/parallel_executor.hpp>
2824

@@ -55,29 +51,6 @@ namespace hpx { namespace detail
5551
}
5652
};
5753

58-
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
59-
// parallel::executor
60-
template <typename Executor>
61-
struct apply_dispatch<Executor,
62-
typename std::enable_if<
63-
traits::is_executor<Executor>::value
64-
>::type>
65-
{
66-
template <typename F, typename ...Ts>
67-
HPX_FORCEINLINE static
68-
typename std::enable_if<
69-
traits::detail::is_deferred_invocable<F, Ts...>::value,
70-
bool
71-
>::type
72-
call(Executor& exec, F&& f, Ts&&... ts)
73-
{
74-
parallel::executor_traits<Executor>::apply_execute(exec,
75-
std::forward<F>(f), std::forward<Ts>(ts)...);
76-
return false;
77-
}
78-
};
79-
#endif
80-
8154
// The overload for hpx::apply taking an executor simply forwards to the
8255
// corresponding executor customization point.
8356
//

hpx/async.hpp

-28
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
#include <hpx/util/bind_action.hpp>
2121
#include <hpx/util/deferred_call.hpp>
2222

23-
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
24-
#include <hpx/traits/v1/is_executor.hpp>
25-
#include <hpx/parallel/executors/v1/executor_traits.hpp>
26-
#endif
2723
#include <hpx/parallel/executors/execution.hpp>
2824
#include <hpx/parallel/executors/parallel_executor.hpp>
2925

@@ -55,30 +51,6 @@ namespace hpx { namespace detail
5551
}
5652
};
5753

58-
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
59-
// parallel::executor
60-
template <typename Executor>
61-
struct async_dispatch<Executor,
62-
typename std::enable_if<
63-
traits::is_executor<Executor>::value
64-
>::type>
65-
{
66-
template <typename F, typename ...Ts>
67-
HPX_FORCEINLINE static
68-
typename std::enable_if<
69-
traits::detail::is_deferred_invocable<F, Ts...>::value,
70-
hpx::future<
71-
typename util::detail::invoke_deferred_result<F, Ts...>::type
72-
>
73-
>::type
74-
call(Executor& exec, F && f, Ts &&... ts)
75-
{
76-
return parallel::executor_traits<Executor>::async_execute(
77-
exec, std::forward<F>(f), std::forward<Ts>(ts)...);
78-
}
79-
};
80-
#endif
81-
8254
// The overload for hpx::async taking an executor simply forwards to the
8355
// corresponding executor customization point.
8456
//

hpx/include/parallel_executor_information.hpp

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
#include <hpx/config.hpp>
1010

11-
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
12-
#include <hpx/parallel/executors/v1/executor_information_traits.hpp>
13-
#endif
1411
#include <hpx/parallel/executors/execution_information.hpp>
1512
#include <hpx/parallel/executors/thread_execution_information.hpp>
1613

hpx/include/parallel_inner_product.hpp

-15
This file was deleted.

hpx/include/traits.hpp

-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@
4242
#include <hpx/traits/is_component.hpp>
4343
#include <hpx/traits/is_continuation.hpp>
4444
#include <hpx/traits/is_distribution_policy.hpp>
45-
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
46-
#include <hpx/traits/v1/is_executor.hpp>
47-
#include <hpx/traits/v1/is_executor_parameters.hpp>
48-
#endif
4945
#include <hpx/traits/is_executor.hpp>
5046
#include <hpx/traits/is_executor_parameters.hpp>
5147
#include <hpx/traits/is_future.hpp>

hpx/lcos/dataflow.hpp

-25
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@
3636
#include <hpx/util/thread_description.hpp>
3737
#include <hpx/util/tuple.hpp>
3838

39-
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
40-
#include <hpx/traits/v1/is_executor.hpp>
41-
#include <hpx/parallel/executors/v1/executor_traits.hpp>
42-
#endif
4339
#include <hpx/parallel/executors/execution.hpp>
4440
#include <hpx/parallel/executors/parallel_executor.hpp>
4541

@@ -267,21 +263,6 @@ namespace hpx { namespace lcos { namespace detail
267263
}
268264
}
269265

270-
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
271-
// handle executors through their executor_traits
272-
template <typename Executor>
273-
HPX_DEPRECATED(HPX_DEPRECATED_MSG) HPX_FORCEINLINE
274-
typename std::enable_if<
275-
traits::is_executor<Executor>::value
276-
>::type
277-
finalize(Executor& exec, Futures&& futures)
278-
{
279-
boost::intrusive_ptr<dataflow_frame> this_(this);
280-
parallel::executor_traits<Executor>::apply_execute(exec,
281-
&dataflow_frame::done, std::move(this_), std::move(futures));
282-
}
283-
#endif
284-
285266
// The overload for hpx::dataflow taking an executor simply forwards
286267
// to the corresponding executor customization point.
287268
//
@@ -441,9 +422,6 @@ namespace hpx { namespace lcos { namespace detail
441422
// threads::executor
442423
template <typename Executor>
443424
struct dataflow_dispatch<Executor, typename std::enable_if<
444-
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
445-
traits::is_executor<Executor>::value ||
446-
#endif
447425
traits::is_one_way_executor<Executor>::value ||
448426
traits::is_two_way_executor<Executor>::value ||
449427
traits::is_threads_executor<Executor>::value
@@ -472,9 +450,6 @@ namespace hpx { namespace lcos { namespace detail
472450
struct dataflow_dispatch<FD, typename std::enable_if<
473451
!traits::is_launch_policy<FD>::value &&
474452
!(
475-
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
476-
traits::is_executor<FD>::value ||
477-
#endif
478453
traits::is_one_way_executor<FD>::value ||
479454
traits::is_two_way_executor<FD>::value ||
480455
traits::is_threads_executor<FD>::value)

0 commit comments

Comments
 (0)