Skip to main content
Ctrl+K
Logo image
  • HPX documentation

User documentation

  • Quick start
  • Tutorials
  • Examples
    • Asynchronous execution
    • Parallel algorithms
    • Asynchronous execution with actions
    • Remote execution with actions
    • Components and actions
    • Dataflow
    • Local to remote
    • Serializing user-defined types
    • Termination detection
  • Manual
    • Prerequisites
    • Getting HPX
    • Building HPX
    • CMake options
    • Using HPX on Compiler Explorer
    • Migration guide
    • Building tests and examples
    • Creating HPX projects
    • Starting the HPX runtime
    • Launching and configuring HPX applications
    • Writing single-node applications
    • Writing distributed applications
    • Running on batch systems
    • Debugging HPX applications
    • Optimizing HPX applications
    • Using the LCI parcelport
    • Using the LCW parcelport
    • HPX runtime and resources
    • Executors
    • Error handling
    • The HPX I/O-streams component
    • Supervision dispatch
    • Troubleshooting
  • Terminology
  • Why HPX?
  • Additional material

Modules

  • Overview
    • Core modules
      • affinity
      • algorithms
      • allocator_support
      • asio
      • assertion
      • async_base
      • async_combinators
      • async_cuda
      • async_local
      • async_mpi
      • async_sycl
      • batch_environments
      • cache
      • checkpoint_base
      • command_line_handling_local
      • compute_local
      • concepts
      • concurrency
      • config
      • config_registry
      • contracts
      • coroutines
      • datastructures
      • debugging
      • errors
      • execution
      • execution_base
      • executors
      • filesystem
      • format
      • functional
      • futures
      • hardware
      • hashing
      • include_local
      • ini
      • init_runtime_local
      • io_service
      • iterator_support
      • itt_notify
      • lci_base
      • lcos_local
      • likwid
      • lock_registration
      • logging
      • memory
      • mpi_base
      • pack_traversal
      • plugin
      • prefix
      • preprocessor
      • program_options
      • properties
      • resiliency
      • resource_partitioner
      • runtime_configuration
      • runtime_local
      • schedulers
      • serialization
      • static_reinit
      • string_util
      • synchronization
      • tag_invoke
      • testing
      • thread_pool_util
      • thread_pools
      • thread_support
      • threading
      • threading_base
      • thread_manager
      • thrust
      • timed_execution
      • timing
      • topology
      • tracy
      • type_support
      • util
      • version
    • Main HPX modules
      • actions
      • actions_base
      • agas
      • agas_base
      • async_colocated
      • async_distributed
      • checkpoint
      • collectives
      • command_line_handling
      • components
      • components_base
      • compute
      • distribution_policies
      • execution_distributed
      • executors_distributed
      • include
      • init_runtime
      • lcos_distributed
      • naming
      • naming_base
      • parcelport_lci
      • parcelport_mpi
      • parcelport_tcp
      • parcelset
      • parcelset_base
      • performance_counters
      • plugin_factories
      • resiliency_distributed
      • runtime_components
      • runtime_distributed
      • segmented_algorithms
      • statistics
      • Supervision module

Reference

  • API reference
    • Public API
    • Public distributed API
    • Supervision dispatch module
    • Full API
      • actions
        • hpx/actions/action_support.hpp
        • hpx/actions/transfer_base_action.hpp
        • hpx/actions/actions_fwd.hpp
        • hpx/actions/transfer_action.hpp
        • hpx/actions/base_action.hpp
      • actions_base
        • hpx/actions_base/basic_action_fwd.hpp
        • hpx/actions_base/reflect_action.hpp
        • HPX_REGISTER_ACTION_DECLARATION
        • HPX_REGISTER_ACTION
        • hpx/actions_base/preassigned_action_id.hpp
        • HPX_DEFINE_COMPONENT_ACTION
        • hpx/actions_base/actions_base_fwd.hpp
        • hpx/actions_base/reflect_annotated_actions.hpp
        • hpx/actions_base/plain_action.hpp
        • hpx/actions_base/lambda_to_action.hpp
        • hpx/actions_base/actions_base_support.hpp
        • hpx/actions_base/macros.hpp
        • hpx/actions_base/traits/action_remote_result.hpp
      • agas
        • hpx/agas/addressing_service.hpp
      • agas_base
        • hpx/agas_base/server/primary_namespace.hpp
      • async_colocated
        • hpx::get_colocation_id
      • async_distributed
        • hpx/async_distributed/packaged_action.hpp
        • hpx::post (distributed)
        • hpx/async_distributed/trigger_lco_fwd.hpp
        • hpx::distributed::promise
        • hpx/async_distributed/promise.hpp
        • hpx/async_distributed/transfer_continuation_action.hpp
        • hpx/async_distributed/async_callback.hpp
        • hpx/async_distributed/continuation.hpp
        • hpx/async_distributed/trigger_lco.hpp
        • hpx/async_distributed/trigger.hpp
        • hpx::dataflow (distributed)
        • hpx::sync (distributed)
        • hpx::async (distributed)
        • hpx/async_distributed/base_lco_with_value.hpp
        • hpx/async_distributed/base_lco.hpp
      • checkpoint
        • hpx/checkpoint/checkpoint.hpp
      • collectives
        • hpx::lcos::fold
        • hpx::lcos::fold_with_index
        • hpx::lcos::inverse_fold
        • hpx::lcos::inverse_fold_with_index
        • hpx::collectives::all_gather
        • hpx::collectives::channel_communicator
        • hpx::collectives::create_channel_communicator
        • hpx::collectives::get
        • hpx::collectives::set
        • hpx::collectives::exclusive_scan
        • hpx::lcos::reduce
        • hpx::lcos::reduce_with_index
        • hpx::distributed::latch
        • hpx::collectives::communicator
        • hpx::collectives::create_communicator
        • hpx::collectives::create_local_communicator
        • hpx::collectives::create_hierarchical_communicator
        • hpx::collectives::communicator::set_info
        • hpx::collectives::communicator::get_info
        • hpx::collectives::communicator::is_root
        • hpx::collectives::gather_here
        • hpx::collectives::gather_there
        • hpx::collectives::all_reduce
        • hpx::collectives::scatter_from
        • hpx::collectives::scatter_to
        • hpx::lcos::spmd_block
        • hpx::lcos::define_spmd_block
        • hpx::collectives::all_to_all
        • hpx::distributed::barrier
        • hpx::collectives::num_sites_arg
        • hpx::collectives::this_site_arg
        • hpx::collectives::that_site_arg
        • hpx::collectives::generation_arg
        • hpx::collectives::root_site_arg
        • hpx::collectives::tag_arg
        • hpx::collectives::arity_arg
        • hpx::collectives::flat_fallback_threshold_arg
        • hpx::lcos::broadcast
        • hpx::lcos::broadcast_post
        • hpx::lcos::broadcast_with_index
        • hpx::lcos::broadcast_post_with_index
        • hpx::collectives::broadcast_to
        • hpx::collectives::broadcast_from
        • hpx/collectives/macros.hpp
        • hpx::collectives::reduce_here
        • hpx::collectives::reduce_there
        • hpx::collectives::inclusive_scan
      • components
        • hpx::components::client
        • hpx/components/get_ptr.hpp
        • hpx::components::client_base
        • hpx/components/basename_registration_fwd.hpp
        • hpx/components/basename_registration.hpp
      • components_base
        • hpx/components_base/agas_interface.hpp
        • HPX_REGISTER_STARTUP_MODULE
        • hpx/components_base/component_type.hpp
        • hpx/components_base/get_lva.hpp
        • HPX_REGISTER_COMMANDLINE_MODULE
        • hpx::components::component
        • hpx::components::component_base
        • hpx/components_base/server/fixed_component_base.hpp
        • hpx/components_base/server/managed_component_base.hpp
        • hpx/components_base/server/migration_support.hpp
      • compute
        • hpx/compute/host/target_distribution_policy.hpp
      • distribution_policies
        • hpx/distribution_policies/binpacking_distribution_policy.hpp
        • hpx/distribution_policies/colocating_distribution_policy.hpp
        • hpx/distribution_policies/unwrapping_result_policy.hpp
        • hpx/distribution_policies/target_distribution_policy.hpp
        • hpx/distribution_policies/default_distribution_policy.hpp
      • execution_distributed
        • hpx/execution_distributed/distributed_bulk_sender.hpp
        • hpx/execution_distributed/distributed_scheduler.hpp
        • hpx/execution_distributed/distributed_then_sender.hpp
        • hpx/execution_distributed/distributed_continues_on_sender.hpp
      • executors_distributed
        • hpx/executors_distributed/distribution_policy_executor.hpp
      • include
        • hpx/experimental/sandbox.hpp
      • init_runtime
        • hpx/hpx_init.hpp
        • hpx/hpx_start.hpp
        • hpx::init_params
        • hpx::start
        • hpx::suspend
        • hpx::resume
        • hpx::finalize
        • hpx::disconnect
        • hpx::init
      • naming_base
        • hpx/naming_base/unmanaged.hpp
      • parcelset
        • hpx/parcelset/parcelhandler.hpp
        • hpx/parcelset/parcelset_fwd.hpp
        • hpx/parcelset/connection_cache.hpp
        • hpx/parcelset/message_handler_fwd.hpp
      • parcelset_base
        • hpx/parcelset_base/parcelport.hpp
        • hpx/parcelset_base/set_parcel_write_handler.hpp
        • hpx/parcelset_base/parcelset_base_fwd.hpp
      • plugin_factories
        • hpx/plugin_factories/message_handler_factory.hpp
        • hpx/plugin_factories/plugin_registry.hpp
        • hpx/plugin_factories/binary_filter_factory.hpp
        • hpx/plugin_factories/parcelport_factory.hpp
      • resiliency_distributed
        • hpx/resiliency_distributed/async_replicate_distributed.hpp
        • hpx/resiliency_distributed/async_replay_distributed.hpp
      • runtime_components
        • HPX_REGISTER_COMPONENT
        • hpx/runtime_components/component_registry.hpp
        • hpx/runtime_components/reflect_client_macros.hpp
        • hpx/runtime_components/reflect_client.hpp
        • hpx/runtime_components/components_fwd.hpp
        • hpx::new_
        • hpx/runtime_components/macros.hpp
      • runtime_distributed
        • hpx/runtime_distributed.hpp
        • hpx/runtime_distributed/big_boot_barrier.hpp
        • hpx/runtime_distributed/applier.hpp
        • hpx/runtime_distributed/migrate_component.hpp
        • hpx/runtime_distributed/get_locality_name.hpp
        • hpx/runtime_distributed/find_here.hpp
        • hpx/runtime_distributed/runtime_support.hpp
        • hpx/runtime_distributed/copy_component.hpp
        • hpx::find_root_locality
        • hpx::find_all_localities
        • hpx::find_remote_localities
        • hpx/runtime_distributed/runtime_fwd.hpp
        • hpx::find_locality
        • hpx/runtime_distributed/get_num_localities.hpp
        • hpx/runtime_distributed/applier_fwd.hpp
        • hpx/runtime_distributed/stubs/runtime_support.hpp
        • hpx/runtime_distributed/server/runtime_support.hpp
        • hpx/runtime_distributed/server/copy_component.hpp
      • segmented_algorithms
        • hpx/parallel/segmented_algorithms/fill.hpp
        • hpx/parallel/segmented_algorithms/exclusive_scan.hpp
        • hpx/parallel/segmented_algorithms/equal.hpp
        • hpx/parallel/segmented_algorithms/is_partitioned.hpp
        • hpx/parallel/segmented_algorithms/replace_copy.hpp
        • hpx/parallel/segmented_algorithms/minmax.hpp
        • hpx/parallel/segmented_algorithms/adjacent_difference.hpp
        • hpx/parallel/segmented_algorithms/adjacent_find.hpp
        • hpx/parallel/segmented_algorithms/generate.hpp
        • hpx/parallel/segmented_algorithms/copy.hpp
        • hpx/parallel/segmented_algorithms/transform_exclusive_scan.hpp
        • hpx/parallel/segmented_algorithms/transform_reduce.hpp
        • hpx/parallel/segmented_algorithms/transform.hpp
        • hpx/parallel/segmented_algorithms/count.hpp
        • hpx/parallel/segmented_algorithms/transform_inclusive_scan.hpp
        • hpx/parallel/segmented_algorithms/is_sorted.hpp
        • hpx/parallel/segmented_algorithms/mismatch.hpp
        • hpx/parallel/segmented_algorithms/replace.hpp
        • hpx/parallel/segmented_algorithms/reduce.hpp
        • hpx/parallel/segmented_algorithms/all_any_none.hpp
        • hpx/parallel/segmented_algorithms/inclusive_scan.hpp
        • hpx/parallel/segmented_algorithms/for_each.hpp
      • supervision
        • hpx::supervision::supervision_manager
        • hpx::supervision::testing::set_register_observer_snapshot_hook
        • hpx::supervision::publish_event
        • hpx::supervision::query_state
        • hpx::supervision::register_observer
        • hpx::supervision::unregister_observer
        • hpx::supervision::remove_target
        • hpx::supervision::register_activity_observer
        • hpx::supervision::unregister_activity_observer
        • hpx::supervision::check_admission
        • hpx::supervision::await_terminal
        • hpx::supervision::is_valid_transition
        • hpx/supervision/server/supervision_manager.hpp
      • algorithms
        • hpx::experimental::task_canceled_exception
        • hpx::experimental::task_block
        • hpx::experimental::define_task_block
        • hpx::experimental::define_task_block_restore_thread
        • hpx::experimental::run_on_all
        • hpx::experimental::task_group
        • hpx::ranges::fold_left
        • hpx::ranges::fold_left_first
        • hpx::ranges::fold_right
        • hpx::ranges::fold_right_last
        • hpx::ranges::fold_left_with_iter
        • hpx::ranges::fold_left_first_with_iter
        • hpx::ranges::fill
        • hpx::ranges::fill_n
        • hpx::ranges::find
        • hpx::ranges::find_if
        • hpx::ranges::find_if_not
        • hpx::ranges::find_end
        • hpx::ranges::find_first_of
        • hpx::ranges::find_last
        • hpx::ranges::find_last_if
        • hpx::ranges::find_last_if_not
        • hpx::ranges::exclusive_scan
        • hpx::ranges::equal
        • hpx::ranges::is_partitioned
        • hpx::ranges::set_intersection
        • hpx::ranges::ends_with
        • hpx::ranges::min_element
        • hpx::ranges::max_element
        • hpx::ranges::minmax_element
        • hpx::ranges::set_difference
        • hpx::ranges::uninitialized_value_construct
        • hpx::ranges::uninitialized_value_construct_n
        • hpx::ranges::shift_left
        • hpx::ranges::adjacent_difference
        • hpx::ranges::adjacent_find
        • hpx::ranges::set_symmetric_difference
        • hpx::ranges::generate
        • hpx::ranges::generate_n
        • hpx::ranges::reverse
        • hpx::ranges::reverse_copy
        • hpx::ranges::search
        • hpx::ranges::search_n
        • hpx::ranges::uninitialized_fill
        • hpx::ranges::uninitialized_fill_n
        • hpx::ranges::copy
        • hpx::ranges::copy_n
        • hpx::ranges::copy_if
        • hpx::ranges::is_heap
        • hpx::ranges::is_heap_until
        • hpx::ranges::merge
        • hpx::ranges::inplace_merge
        • hpx::ranges::remove
        • hpx::ranges::remove_if
        • hpx::ranges::starts_with
        • hpx::ranges::set_union
        • hpx::ranges::swap_ranges
        • hpx::ranges::shift_right
        • hpx::ranges::partial_sort
        • hpx::ranges::partial_sort_copy
        • hpx::ranges::lexicographical_compare
        • hpx::ranges::stable_sort
        • hpx::ranges::partition
        • hpx::ranges::stable_partition
        • hpx::ranges::partition_copy
        • hpx::ranges::experimental::for_loop
        • hpx::ranges::experimental::for_loop_strided
        • hpx::ranges::experimental::for_loop_n
        • hpx::ranges::experimental::for_loop_n_strided
        • hpx::ranges::sort
        • hpx::ranges::uninitialized_default_construct
        • hpx::ranges::uninitialized_default_construct_n
        • hpx::ranges::transform_exclusive_scan
        • hpx::ranges::unique
        • hpx::ranges::unique_copy
        • hpx::ranges::rotate
        • hpx::ranges::rotate_copy
        • hpx::ranges::transform_reduce
        • hpx::ranges::transform
        • hpx::ranges::count
        • hpx::ranges::count_if
        • hpx::ranges::transform_inclusive_scan
        • hpx::ranges::is_sorted
        • hpx::ranges::is_sorted_until
        • hpx::ranges::uninitialized_copy
        • hpx::ranges::uninitialized_copy_n
        • hpx::ranges::mismatch
        • hpx::ranges::make_heap
        • hpx::ranges::nth_element
        • hpx::ranges::replace
        • hpx::ranges::replace_if
        • hpx::ranges::replace_copy
        • hpx::ranges::replace_copy_if
        • hpx::ranges::includes
        • hpx::ranges::move
        • hpx::ranges::uninitialized_move
        • hpx::ranges::uninitialized_move_n
        • hpx::ranges::reduce
        • hpx/parallel/container_algorithms/iota.hpp
        • hpx::ranges::destroy
        • hpx::ranges::destroy_n
        • hpx::ranges::all_of
        • hpx::ranges::any_of
        • hpx::ranges::none_of
        • hpx::ranges::inclusive_scan
        • hpx::ranges::for_each
        • hpx::ranges::for_each_n
        • hpx::ranges::remove_copy
        • hpx::ranges::remove_copy_if
        • hpx::fill
        • hpx::fill_n
        • hpx/parallel/algorithms/transform_reduce_binary.hpp
        • hpx::find
        • hpx::find_if
        • hpx::find_if_not
        • hpx::find_end
        • hpx::find_first_of
        • hpx::exclusive_scan
        • hpx::equal
        • hpx::is_partitioned
        • hpx::set_intersection
        • hpx::ends_with
        • hpx::min_element
        • hpx::max_element
        • hpx::minmax_element
        • hpx::experimental::reduction_max
        • hpx::reduce_deterministic
        • hpx::set_difference
        • hpx::uninitialized_value_construct
        • hpx::uninitialized_value_construct_n
        • hpx::experimental::reduction_bit_and
        • hpx::shift_left
        • hpx::adjacent_difference
        • hpx::adjacent_find
        • hpx::set_symmetric_difference
        • hpx::generate
        • hpx::generate_n
        • hpx::reverse
        • hpx::reverse_copy
        • hpx::search
        • hpx::search_n
        • hpx::experimental::reduction_multiplies
        • hpx::uninitialized_fill
        • hpx::uninitialized_fill_n
        • hpx::copy
        • hpx::copy_n
        • hpx::copy_if
        • hpx::is_heap
        • hpx::is_heap_until
        • hpx::merge
        • hpx::inplace_merge
        • hpx::remove
        • hpx::remove_if
        • hpx::starts_with
        • hpx::set_union
        • hpx::swap_ranges
        • hpx::experimental::reduction_bit_xor
        • hpx::shift_right
        • hpx::partial_sort
        • hpx::partial_sort_copy
        • hpx::lexicographical_compare
        • hpx::stable_sort
        • hpx::partition
        • hpx::stable_partition
        • hpx::partition_copy
        • hpx::experimental::for_loop
        • hpx::experimental::for_loop_strided
        • hpx::experimental::for_loop_n
        • hpx::experimental::for_loop_n_strided
        • hpx::sort
        • hpx::uninitialized_default_construct
        • hpx::uninitialized_default_construct_n
        • hpx::experimental::reduction_bit_or
        • hpx::transform_exclusive_scan
        • hpx::unique
        • hpx::unique_copy
        • hpx::rotate
        • hpx::rotate_copy
        • hpx::transform_reduce
        • hpx::experimental::reduction
        • hpx::transform
        • hpx::count
        • hpx::count_if
        • hpx::transform_inclusive_scan
        • hpx::experimental::reduction_plus
        • hpx::experimental::sort_by_key
        • hpx::is_sorted
        • hpx::is_sorted_until
        • hpx::uninitialized_copy
        • hpx::uninitialized_copy_n
        • hpx::mismatch
        • hpx::make_heap
        • hpx::experimental::reduction_min
        • hpx::nth_element
        • hpx::replace
        • hpx::replace_if
        • hpx::replace_copy
        • hpx::replace_copy_if
        • hpx::experimental::induction
        • hpx::includes
        • hpx::move
        • hpx::uninitialized_move
        • hpx::uninitialized_move_n
        • hpx::reduce
        • hpx/parallel/algorithms/iota.hpp
        • hpx::destroy
        • hpx::destroy_n
        • hpx::reduce_by_key
        • hpx::experimental::for_each_index
        • hpx::all_of
        • hpx::any_of
        • hpx::none_of
        • hpx::inclusive_scan
        • hpx::for_each
        • hpx::for_each_n
        • hpx::remove_copy
        • hpx::remove_copy_if
        • hpx::uninitialized_relocate
        • hpx::uninitialized_relocate_n
        • hpx/parallel/util/range.hpp
      • asio
        • hpx/asio/asio_util.hpp
      • assertion
        • hpx/assertion/evaluate_assert.hpp
        • hpx/assertion/api.hpp
        • HPX_CURRENT_SOURCE_LOCATION
        • hpx::source_location
        • HPX_ASSERT
        • HPX_ASSERT_MSG
      • async_base
        • hpx::post
        • hpx::launch
        • hpx::dataflow
        • hpx::sync
        • hpx::async
      • async_combinators
        • hpx/async_combinators/split_future.hpp
        • hpx::wait_some
        • hpx::wait_some_nothrow
        • hpx::wait_some_n
        • hpx::wait_some_n_nothrow
        • hpx::when_any
        • hpx::when_all
        • hpx::when_some
        • hpx::wait_each
        • hpx::wait_each_nothrow
        • hpx::wait_each_n
        • hpx::wait_each_n_nothrow
        • hpx::wait_any
        • hpx::wait_any_nothrow
        • hpx::wait_any_n
        • hpx::wait_any_n_nothrow
        • hpx::wait_all_for
        • hpx::wait_all_for_nothrow
        • hpx::wait_all_for_n
        • hpx::wait_all_for_n_nothrow
        • hpx::wait_all
        • hpx::wait_all_nothrow
        • hpx::wait_all_n
        • hpx::wait_all_n_nothrow
        • hpx::when_each
      • async_cuda
        • hpx/async_cuda/cuda_executor.hpp
        • hpx/async_cuda/cublas_executor.hpp
      • async_mpi
        • hpx/async_mpi/mpi_executor.hpp
        • hpx/async_mpi/transform_mpi.hpp
      • async_sycl
        • hpx/async_sycl/sycl_executor.hpp
      • cache
        • hpx/cache/local_cache.hpp
        • hpx/cache/lru_cache.hpp
        • hpx/cache/entries/lfu_entry.hpp
        • hpx/cache/entries/fifo_entry.hpp
        • hpx/cache/entries/entry.hpp
        • hpx/cache/entries/size_entry.hpp
        • hpx/cache/entries/lru_entry.hpp
        • hpx/cache/statistics/no_statistics.hpp
        • hpx/cache/statistics/local_statistics.hpp
      • checkpoint_base
        • hpx/checkpoint_base/checkpoint_data.hpp
      • compute_local
        • hpx/compute_local/vector.hpp
        • hpx/compute_local/host/block_fork_join_executor.hpp
        • hpx/compute_local/host/block_executor.hpp
      • config
        • hpx/config/endian.hpp
      • contracts
        • HPX_PRE
        • HPX_POST
        • HPX_CONTRACT_ASSERT
      • coroutines
        • hpx/coroutines/thread_enums.hpp
        • hpx/coroutines/thread_id_type.hpp
      • datastructures
        • hpx::any_nonser. hpx::bad_any_cast
        • hpx::unique_any_nonser
        • hpx::any_cast
        • hpx::make_any_nonser
        • hpx::make_unique_any_nonser
        • hpx::ignore
        • hpx::tuple
        • hpx::tuple_size
        • hpx::tuple_element
        • hpx::make_tuple
        • hpx::tie
        • hpx::forward_as_tuple
        • hpx::tuple_cat
        • hpx::get
        • hpx::any
        • hpx::make_any
      • debugging
        • hpx/debugging/print.hpp
      • errors
        • hpx/errors/define_error_info.hpp
        • hpx::error_code
        • hpx/errors/try_catch_exception_ptr.hpp
        • hpx::exception
        • hpx/errors/exception_list.hpp
        • HPX_THROW_EXCEPTION
        • HPX_THROW_BAD_ALLOC
        • HPX_THROWS_IF
        • hpx/errors/macros.hpp
        • hpx/errors/error.hpp
        • hpx/errors/exception_fwd.hpp
      • execution
        • hpx::execution::experimental::guided_chunk_size
        • hpx/execution/executors/execution_parameters_fwd.hpp
        • hpx/execution/executors/default_parameters.hpp
        • hpx::execution::experimental::collect_chunking_parameters
        • hpx/execution/executors/execution_parameters.hpp
        • hpx/execution/executors/rebind_executor.hpp
        • hpx::execution::experimental::max_num_chunks
        • hpx::execution::experimental::auto_chunk_size
        • hpx/execution/executors/execution_information.hpp
        • hpx::execution::experimental::num_cores
        • hpx::execution::experimental::dynamic_chunk_size
        • hpx::execution::experimental::persistent_auto_chunk_size
        • hpx/execution/executors/execution.hpp
        • hpx/execution/executors/polymorphic_executor.hpp
        • hpx::execution::experimental::static_chunk_size
        • hpx/execution/executors/adaptive_static_chunk_size.hpp
        • hpx/execution/traits/is_execution_policy.hpp
        • hpx/execution/algorithms/sender_future.hpp
        • hpx/execution/algorithms/future_sender.hpp
      • execution_base
        • hpx/execution_base/execution.hpp
        • hpx/execution_base/traits/is_executor_parameters.hpp
      • executors
        • hpx/executors/restricted_thread_pool_executor.hpp
        • hpx/executors/fork_join_executor.hpp
        • hpx/executors/execution_policy_mappings.hpp
        • hpx/executors/execution_policy_annotation.hpp
        • hpx/executors/explicit_scheduler_executor.hpp
        • hpx/executors/scheduler_executor.hpp
        • hpx/executors/sequenced_executor.hpp
        • hpx/executors/parallel_executor.hpp
        • hpx::execution::seq
        • hpx::execution::par
        • hpx::execution::par_unseq
        • hpx::execution::task
        • hpx::execution::sequenced_policy
        • hpx::execution::parallel_policy
        • hpx::execution::parallel_unsequenced_policy
        • hpx::execution::sequenced_task_policy
        • hpx::execution::parallel_task_policy
        • hpx/executors/service_executors.hpp
        • hpx/executors/thread_pool_scheduler.hpp
        • hpx/executors/executor_scheduler.hpp
        • hpx/executors/parallel_executor_aggregated.hpp
        • hpx/executors/annotating_executor.hpp
        • hpx/executors/exception_list.hpp
        • hpx/executors/execution_policy_scheduling_property.hpp
        • hpx/executors/std_execution_policy.hpp
        • hpx/executors/thread_pool_continues_on_sender.hpp
        • hpx/executors/current_executor.hpp
        • hpx/executors/execution_policy_parameters.hpp
        • hpx/executors/datapar/execution_policy_mappings.hpp
        • hpx/executors/datapar/execution_policy.hpp
      • filesystem
        • hpx/filesystem/api.hpp
      • functional
        • hpx::mem_fn
        • hpx::reference_wrapper
        • hpx::ref
        • hpx::cref
        • hpx::function_ref
        • hpx::bind_back
        • hpx::invoke_fused
        • hpx::invoke_fused_r
        • hpx::bind_front
        • hpx::function
        • hpx::move_only_function
        • hpx::bind
        • hpx::placeholders::_1
        • hpx::placeholders::_2
        • —
        • hpx::placeholders::_9
        • hpx::experimental::scope_exit
        • hpx::experimental::scope_fail
        • hpx::experimental::scope_success
        • hpx::is_bind_expression
        • hpx::is_placeholder
      • futures
        • hpx::promise
        • hpx::future
        • hpx::shared_future
        • hpx::make_future
        • hpx::make_shared_future
        • hpx::make_ready_future
        • hpx::make_ready_future_alloc
        • hpx::make_ready_future_at
        • hpx::make_ready_future_after
        • hpx::make_exceptional_future
        • hpx/futures/future_fwd.hpp
        • hpx::packaged_task
      • io_service
        • hpx/io_service/io_service_pool.hpp
      • lcos_local
        • hpx::lcos::local::and_gate
        • hpx/lcos_local/trigger.hpp
      • pack_traversal
        • hpx/pack_traversal/pack_traversal_async.hpp
        • hpx::functional::unwrap
        • hpx::functional::unwrap_n
        • hpx::functional::unwrap_all
        • hpx::unwrap
        • hpx::unwrap_n
        • hpx::unwrap_all
        • hpx::unwrapping
        • hpx::unwrapping_n
        • hpx::unwrapping_all
        • hpx/pack_traversal/pack_traversal.hpp
      • preprocessor
        • hpx/preprocessor/nargs.hpp
        • hpx/preprocessor/expand.hpp
        • hpx/preprocessor/stringize.hpp
        • hpx/preprocessor/strip_parens.hpp
        • hpx/preprocessor/cat.hpp
      • resiliency
        • hpx/resiliency/async_replay.hpp
        • hpx/resiliency/async_replicate.hpp
        • hpx/resiliency/replay_executor.hpp
        • hpx/resiliency/async_replay_executor.hpp
        • hpx/resiliency/resiliency_cpos.hpp
        • hpx/resiliency/async_replicate_executor.hpp
        • hpx/resiliency/replicate_executor.hpp
      • runtime_configuration
        • hpx/runtime_configuration/component_registry_base.hpp
        • hpx/runtime_configuration/runtime_configuration.hpp
        • hpx::components::component_commandline_base
        • hpx::runtime_mode
        • hpx/runtime_configuration/plugin_registry_base.hpp
        • HPX_REGISTER_COMPONENT_MODULE
      • runtime_local
        • hpx::get_thread_name
        • hpx::register_thread
        • hpx::unregister_thread
        • hpx::get_os_thread_data
        • hpx::enumerate_os_threads
        • hpx::get_runtime_instance_number
        • hpx::register_on_exit
        • hpx::is_starting
        • hpx::tolerate_node_faults
        • hpx::is_running
        • hpx::is_stopped
        • hpx::is_stopped_or_shutting_down
        • hpx::get_num_worker_threads
        • hpx::get_system_uptime
        • hpx::shutdown_function_type
        • hpx::register_pre_shutdown_function
        • hpx::register_shutdown_function
        • hpx/runtime_local/termination_detection.hpp
        • hpx::get_locality_name
        • hpx/runtime_local/report_error.hpp
        • hpx/runtime_local/component_startup_shutdown_base.hpp
        • hpx::get_locality_id
        • hpx/runtime_local/get_worker_thread_num.hpp
        • hpx::startup_function_type
        • hpx::register_pre_startup_function
        • hpx::register_startup_function
        • hpx/runtime_local/service_executors.hpp
        • hpx/runtime_local/custom_exception_info.hpp
        • hpx/runtime_local/runtime_local.hpp
        • hpx/runtime_local/thread_pool_helpers.hpp
        • hpx/runtime_local/thread_hooks.hpp
        • hpx::get_initial_num_localities
        • hpx::get_num_localities
        • hpx/runtime_local/get_os_thread_count.hpp
      • serialization
        • hpx/serialization/base_object.hpp
      • synchronization
        • hpx::recursive_mutex
        • hpx::mutex
        • hpx::timed_mutex
        • hpx/synchronization/event.hpp
        • hpx::condition_variable
        • hpx::condition_variable_any
        • hpx::cv_status
        • hpx::spinlock
        • hpx::once_flag
        • hpx::call_once
        • hpx::latch
        • hpx::counting_semaphore
        • hpx::barrier
        • hpx::no_mutex
        • hpx/synchronization/sliding_semaphore.hpp
        • hpx::binary_semaphore
        • hpx::nostopstate
        • hpx::stop_callback
        • hpx::stop_source
        • hpx::stop_token
        • hpx::nostopstate_t
        • hpx::shared_mutex
      • tag_invoke
        • hpx::invoke
        • hpx::is_invocable
        • hpx::is_invocable_r
      • thread_pool_util
        • hpx/thread_pool_util/thread_pool_suspension_helpers.hpp
      • thread_support
        • hpx::unlock_guard
        • hpx/thread_support/spinlock.hpp
      • threading
        • hpx::jthread
        • hpx::thread
        • hpx::this_thread::yield
        • hpx::this_thread::get_id
        • hpx::this_thread::sleep_for
        • hpx::this_thread::sleep_until
      • threading_base
        • hpx/threading_base/thread_description.hpp
        • hpx/threading_base/threading_base_fwd.hpp
        • hpx/threading_base/register_thread.hpp
        • hpx::get_worker_thread_num
        • hpx::get_local_worker_thread_num
        • hpx::get_thread_pool_num
        • hpx/threading_base/print.hpp
        • hpx::annotated_function
        • hpx/threading_base/thread_helpers.hpp
        • hpx::scoped_annotation
        • hpx/threading_base/thread_data.hpp
        • hpx/threading_base/thread_pool_base.hpp
      • threadmanager
        • hpx/threadmanager/threadmanager.hpp
      • thrust
        • hpx/thrust/algorithms.hpp
      • timed_execution
        • hpx/timed_execution/timed_execution_fwd.hpp
        • hpx/timed_execution/timed_executors.hpp
        • hpx/timed_execution/timed_execution.hpp
        • hpx/timed_execution/traits/is_timed_executor.hpp
      • timing
        • hpx::chrono::high_resolution_timer
        • hpx::chrono::high_resolution_clock
      • topology
        • hpx/topology/cpu_mask.hpp
        • hpx/topology/topology.hpp
      • tracing
        • hpx/tracing/tracing.hpp
        • hpx/tracing/backends/apex.hpp
        • hpx/tracing/backends/empty.hpp
        • hpx/tracing/backends/ittnotify.hpp
        • hpx/tracing/backends/tracy.hpp
      • tracy
        • hpx/tracy/tracy_tls.hpp
        • hpx/tracy/tracy.hpp
      • util
        • hpx/util/insert_checked.hpp
        • hpx/util/sed_transform.hpp
      • component_storage
        • hpx/components/component_storage/migrate_from_storage.hpp
        • hpx/components/component_storage/migrate_to_storage.hpp
      • process
        • hpx/components/process/process.hpp
      • supervision_dispatch
        • hpx::supervision::init
        • hpx::supervision::finalize
        • hpx::supervision::is_initialized
        • hpx::supervision::registry
        • hpx::supervision::testing::local_snapshot_peers
        • hpx::supervision::testing::set_failure_detection_poll_timeout_for_testing
        • hpx::supervision::testing::last_join_locality
        • hpx::supervision::testing::suspend_heartbeat_for_testing
        • hpx::supervision::testing::failure_detection_sweep_in_flight_for_testing
        • hpx::supervision::testing::stop_background_loops
        • hpx::supervision::dispatch_work
        • hpx::supervision::invoke_fenced_action
        • hpx::supervision::discover_peers
        • hpx::supervision::fan_out_join
        • hpx::supervision::discover_and_join
        • hpx/supervision_dispatch/server/registry.hpp

Developer documentation

  • Contributing to HPX
    • Contributing to HPX
    • HPX governance model
    • Release procedure for HPX
    • Testing HPX
    • Using docker for development
    • Documentation
    • Module structure

Other

  • Releases
    • HPX V2.0.0 (TBD)
    • HPX V1.11.0 (Jun 30, 2025)
    • HPX V1.10.0 (May 29, 2024)
    • HPX V1.9.1 (August 4, 2023)
    • HPX V1.9.0 (May 2, 2023)
    • HPX V1.8.1 (Aug 5, 2022)
    • HPX V1.8.0 (May 18, 2022)
    • HPX V1.7.1 (Aug 12, 2021)
    • HPX V1.7.0 (Jul 14, 2021)
    • HPX V1.6.0 (Feb 17, 2021)
    • HPX V1.5.1 (Sep 30, 2020)
    • HPX V1.5.0 (Sep 02, 2020)
    • HPX V1.4.1 (Feb 12, 2020)
    • HPX V1.4.0 (January 15, 2020)
    • HPX V1.3.0 (May 23, 2019)
    • HPX V1.2.1 (Feb 19, 2019)
    • HPX V1.2.0 (Nov 12, 2018)
    • HPX V1.1.0 (Mar 24, 2018)
    • HPX V1.0.0 (Apr 24, 2017)
    • HPX V0.9.99 (Jul 15, 2016)
    • HPX V0.9.11 (Nov 11, 2015)
    • HPX V0.9.10 (Mar 24, 2015)
    • HPX V0.9.9 (Oct 31, 2014, codename Spooky)
    • HPX V0.9.8 (Mar 24, 2014)
    • HPX V0.9.7 (Nov 13, 2013)
    • HPX V0.9.6 (Jul 30, 2013)
    • HPX V0.9.5 (Jan 16, 2013)
    • HPX V0.9.0 (Jul 5, 2012)
    • HPX V0.8.1 (Apr 21, 2012)
    • HPX V0.8.0 (Mar 23, 2012)
    • HPX V0.7.0 (Dec 12, 2011)
    • HPX V1.9.0 Namespace changes
  • Citing HPX
  • HPX users
  • About HPX
    • History
    • People
  • Repository
  • Open issue
  • .rst

hpx::once_flag

hpx::once_flag#

Defined in header hpx/mutex.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

See also:

  • hpx::call_once

struct once_flag#

The class hpx::once_flag is a helper structure for hpx::call_once. An object of type hpx::once_flag that is passed to multiple calls to hpx::call_once allows those calls to coordinate with each other such that only one of the calls will actually run to completion. hpx::once_flag is neither copyable nor movable.

previous

hpx::spinlock

next

hpx::call_once

By The HPX project

© Copyright 2026, HPX Project, a Series of LF Projects, LLC.

Last updated on Aug 21, 2026.