Public API
Contents
Public API#
Our API is semantically conforming; hence, the reader is highly encouraged to refer to the
corresponding facility in the C++ Standard if
needed. All names below are also available in the top-level hpx
namespace unless
otherwise noted. The names in hpx
should be preferred. The names in
sub-namespaces will eventually be removed.
hpx/algorithm.hpp
#
The header hpx/algorithm.hpp corresponds to the C++ standard library header algorithm. See Using parallel algorithms for more information about the parallel algorithms.
Classes#
Class |
C++ standard |
---|---|
Functions#
hpx function |
C++ standard |
---|---|
hpx::ranges function |
C++ standard |
---|---|
hpx/any.hpp
#
The header hpx/any.hpp corresponds to the C++ standard library header any.
hpx::any
is compatible with std::any
.
Classes#
Class |
C++ standard |
---|---|
Functions#
Function |
C++ standard |
---|---|
hpx/assert.hpp
#
The header hpx/assert.hpp corresponds to the C++ standard library header cassert.
HPX_ASSERT
is the HPX equivalent to assert
in cassert
.
HPX_ASSERT
can also be used in CUDA device code.
Macros#
Macro |
---|
hpx/barrier.hpp
#
The header hpx/barrier.hpp corresponds to the
C++ standard library header barrier and contains a distributed barrier implementation. This
functionality is also exposed through the hpx::distributed
namespace. The name in
hpx::distributed
should be preferred.
Classes#
Class |
C++ standard |
---|---|
Class |
---|
hpx/channel.hpp
#
The header hpx/channel.hpp contains a local and a
distributed channel implementation. This functionality is also exposed through the hpx::distributed
namespace. The name in hpx::distributed
should be preferred.
Classes#
Class |
---|
|
Class |
---|
|
hpx/chrono.hpp
#
The header hpx/chrono.hpp corresponds to the C++ standard library header chrono. The following replacements and extensions are provided compared to chrono.
Classes#
Class |
C++ standard |
---|---|
|
hpx/condition_variable.hpp
#
The header hpx/condition_variable.hpp corresponds to the C++ standard library header condition_variable.
Classes#
Class |
C++ standard |
---|---|
hpx/exception.hpp
#
The header hpx/exception.hpp corresponds to
the C++ standard library header exception. hpx::exception
extends std::exception
and is the base class for all exceptions thrown in HPX.
HPX_THROW_EXCEPTION
can be used to throw HPX exceptions with file and line information
attached to the exception.
Macros#
Classes#
Class |
C++ standard |
---|---|
hpx/execution.hpp
#
The header hpx/execution.hpp corresponds to the C++ standard library header execution. See High level parallel facilities, Using parallel algorithms and Executor parameters and executor parameter traits for more information about execution policies and executor parameters.
Note
These names are only available in the hpx::execution
namespace, not in
the top-level hpx
namespace.
Constants#
Constant |
C++ standard |
---|---|
Classes#
Class |
C++ standard |
---|---|
hpx/functional.hpp
#
The header hpx/functional.hpp corresponds to the
C++ standard library header functional. hpx::function
is a more
efficient and serializable replacement for std::function
.
Constants#
The following constants correspond to the C++ standard std::placeholders
Constant |
---|
… |
Classes#
Class |
C++ standard |
---|---|
Functions#
Function |
C++ standard |
---|---|
hpx/future.hpp
#
The header hpx/future.hpp corresponds to the C++ standard library header future. See Extended facilities for futures for more information about extensions to futures compared to the C++ standard library.
This header file also contains overloads of hpx::async
,
hpx::post
, hpx::sync
, and hpx::dataflow
that can be used with
actions. See Action invocation for more information about invoking actions.
Classes#
Class |
C++ standard |
---|---|
Note
All names except hpx::promise
are also available in
the top-level hpx
namespace. hpx::promise
refers to
hpx::distributed::promise
, a distributed variant of
hpx::promise
, but will eventually refer to
hpx::promise
after a deprecation period.
Class |
---|
Functions#
Function |
C++ standard |
---|---|
hpx/init.hpp
#
The header hpx/init.hpp contains functionality for starting, stopping, suspending, and resuming the HPX runtime. This is the main way to explicitly start the HPX runtime. See Starting the HPX runtime for more details on starting the HPX runtime.
Classes#
Class |
---|
Functions#
Function |
---|
hpx/latch.hpp
#
The header hpx/latch.hpp corresponds to the C++
standard library header latch. It contains a local and a distributed latch
implementation. This functionality is also exposed through the hpx::distributed
namespace.
The name in hpx::distributed
should be preferred.
Classes#
Class |
C++ standard |
---|---|
Class |
---|
hpx/mutex.hpp
#
The header hpx/mutex.hpp corresponds to the C++ standard library header mutex.
Classes#
Class |
C++ standard |
---|---|
Functions#
Class |
C++ standard |
---|---|
hpx/memory.hpp
#
The header hpx/memory.hpp corresponds to the C++ standard library header memory. It contains parallel versions of the copy, fill, move, and construct helper functions in memory. See Using parallel algorithms for more information about the parallel algorithms.
Functions#
hpx function |
C++ standard |
---|---|
hpx::ranges function |
C++ standard |
---|---|
hpx/numeric.hpp
#
The header hpx/numeric.hpp corresponds to the C++ standard library header numeric. See Using parallel algorithms for more information about the parallel algorithms.
Functions#
hpx function |
C++ standard |
---|---|
hpx::ranges function |
---|
|
hpx/optional.hpp
#
The header hpx/optional.hpp corresponds to the
C++ standard library header optional. hpx::optional
is compatible
with std::optional
.
Constants#
hpx::nullopt
Classes#
Class |
C++ standard |
---|---|
|
|
|
|
|
hpx/runtime.hpp
#
The header hpx/runtime.hpp contains functions for accessing local and distributed runtime information.
Typedefs#
Typedef |
---|
Functions#
Function |
---|
hpx/experimental/scope.hpp
#
The header hpx/experimental/scope.hpp corresponds to the C++ standard library header experimental/scope.
Classes#
Class |
C++ standard |
---|---|
hpx/semaphore.hpp
#
The header hpx/semaphore.hpp corresponds to the C++ standard library header semaphore.
Classes#
Class |
C++ standard |
---|---|
hpx/source_location.hpp
#
The header hpx/source_location.hpp corresponds to the C++ standard library header source_location.
Classes#
Class |
C++ standard |
---|---|
hpx/stop_token.hpp
#
The header hpx/stop_token.hpp corresponds to the C++ standard library header stop_token.
Constants#
Constant |
C++ standard |
---|---|
Classes#
Class |
C++ standard |
---|---|
hpx/system_error.hpp
#
The header hpx/system_error.hpp corresponds to the C++ standard library header system_error.
Classes#
Class |
C++ standard |
---|---|
hpx/task_block.hpp
#
The header hpx/task_block.hpp corresponds to the
task_block
feature in N4755. See using_task_block for more details on using task
blocks.
Classes#
Class |
---|
Functions#
Function |
---|
hpx/experimental/task_group.hpp
#
The header hpx/experimental/task_group.hpp
corresponds to the task_group
feature in oneAPI Threading Building Blocks (oneTBB).
Classes#
Class |
---|
hpx/thread.hpp
#
The header hpx/thread.hpp corresponds to the C++ standard library header thread. The functionality in this header is equivalent to the standard library thread functionality, with the exception that the HPX equivalents are implemented on top of lightweight threads and the HPX runtime.
Classes#
Class |
C++ standard |
---|---|
Functions#
Function |
C++ standard |
---|---|
hpx/tuple.hpp
#
The header hpx/tuple.hpp corresponds to the
C++ standard library header tuple. hpx::tuple
can be used in
CUDA device code, unlike std::tuple
.
Constants#
Constant |
C++ standard |
---|---|
Classes#
Class |
C++ standard |
---|---|
Functions#
Function |
C++ standard |
---|---|
hpx/type_traits.hpp
#
The header hpx/type_traits.hpp corresponds to the C++ standard library header type_traits.
Classes#
Class |
C++ standard |
---|---|
hpx/unwrap.hpp
#
The header hpx/unwrap.hpp contains utilities for unwrapping futures.
Classes#
Class |
---|
Functions#
Function |
---|
hpx/version.hpp
#
The header hpx/version.hpp provides version information about HPX.
Macros#
Macro |
---|
|
|
|
|
|
|
|
Functions#
Function |
---|
|
|
|
|
|
|
|
|
|
hpx/wrap_main.hpp
#
The header hpx/wrap_main.hpp does not provide any direct functionality
but is used for implicitly using main
as the runtime entry point. See Re-use the main() function as the main HPX entry point for more
details on implicitly starting the HPX runtime.