hpx/threading_base/scheduler_mode.hpp

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

Defines

HPX_SCHEDULER_MODE_UNSCOPED_ENUM_DEPRECATION_MSG
namespace hpx
namespace threads
namespace policies

Enums

enum scheduler_mode

This enumeration describes the possible modes of a scheduler.

Values:

nothing_special = 0x0000

As the name suggests, this option can be used to disable all other options.

do_background_work = 0x0001

The scheduler will periodically call a provided callback function from a special HPX thread to enable performing background-work, for instance driving networking progress or garbage-collect AGAS.

reduce_thread_priority = 0x0002

The kernel priority of the os-thread driving the scheduler will be reduced below normal.

delay_exit = 0x0004

The scheduler will wait for some unspecified amount of time before exiting the scheduling loop while being terminated to make sure no other work is being scheduled during processing the shutdown request.

fast_idle_mode = 0x0008

Some schedulers have the capability to act as ‘embedded’ schedulers. In this case it needs to periodically invoke a provided callback into the outer scheduler more frequently than normal. This option enables this behavior.

enable_elasticity = 0x0010

This option allows for the scheduler to dynamically increase and reduce the number of processing units it runs on. Setting this value not succeed for schedulers that do not support this functionality.

enable_stealing = 0x0020

This option allows schedulers that support work thread/stealing to enable/disable it

enable_stealing_numa = 0x0040

This option allows schedulersthat support it to disallow stealing between numa domains

assign_work_round_robin = 0x0080

This option tells schedulersthat support it to add tasks round robin to queues on each core

assign_work_thread_parent = 0x0100

This option tells schedulers that support it to add tasks round to the same core/queue that the parent task is running on

steal_high_priority_first = 0x0200

This option tells schedulers that support it to always (try to) steal high priority tasks from other queues before finishing their own lower priority tasks

steal_after_local = 0x0400

This option tells schedulers that support it to steal tasks only when their local queues are empty

enable_idle_backoff = 0x0800

This option allows for certain schedulers to explicitly disable exponential idle-back off

default_ = do_background_work | reduce_thread_priority | delay_exit | enable_stealing | enable_stealing_numa | assign_work_round_robin | steal_after_local | enable_idle_backoff

This option represents the default mode.

all_flags = do_background_work | reduce_thread_priority | delay_exit | fast_idle_mode | enable_elasticity | enable_stealing | enable_stealing_numa | assign_work_round_robin | assign_work_thread_parent | steal_high_priority_first | steal_after_local | enable_idle_backoff

This enables all available options.

Functions

constexpr scheduler_mode operator|(scheduler_mode lhs, scheduler_mode rhs)
constexpr scheduler_mode operator|(std::uint32_t lhs, scheduler_mode rhs)
constexpr scheduler_mode operator|(scheduler_mode lhs, std::uint32_t rhs)
constexpr std::uint32_t operator&(scheduler_mode lhs, scheduler_mode rhs)
constexpr std::uint32_t operator&(std::uint32_t lhs, scheduler_mode rhs)
constexpr std::uint32_t operator&(scheduler_mode lhs, std::uint32_t rhs)
constexpr std::uint32_t operator~(scheduler_mode mode)

Variables

constexpr scheduler_mode nothing_special = scheduler_mode::nothing_special
constexpr scheduler_mode do_background_work = scheduler_mode::do_background_work
constexpr scheduler_mode reduce_thread_priority = scheduler_mode::reduce_thread_priority
constexpr scheduler_mode delay_exit = scheduler_mode::delay_exit
constexpr scheduler_mode fast_idle_mode = scheduler_mode::fast_idle_mode
constexpr scheduler_mode enable_elasticity = scheduler_mode::enable_elasticity
constexpr scheduler_mode enable_stealing = scheduler_mode::enable_stealing
constexpr scheduler_mode enable_stealing_numa = scheduler_mode::enable_stealing_numa
constexpr scheduler_mode assign_work_round_robin = scheduler_mode::assign_work_round_robin
constexpr scheduler_mode assign_work_thread_parent = scheduler_mode::assign_work_thread_parent
constexpr scheduler_mode steal_high_priority_first = scheduler_mode::steal_high_priority_first
constexpr scheduler_mode steal_after_local = scheduler_mode::steal_after_local
constexpr scheduler_mode enable_idle_backoff = scheduler_mode::enable_idle_backoff
constexpr scheduler_mode default_mode = scheduler_mode::default_
constexpr scheduler_mode all_flags = scheduler_mode::all_flags