NUMA-aware scheduler that balances work across per-node TBB arenas.
More...
#include <tbb_numa_scheduler.hpp>
|
| const std::vector< int > & | numa_nodes () const noexcept |
| | Access the NUMA nodes managed by this scheduler.
|
| |
| void | pause () override |
| | Pause all managed arenas.
|
| |
| void | resume () override |
| | Resume all managed arenas.
|
| |
| void | run_all () |
| | Drain all arenas by waiting for completion of pending work.
|
| |
| void | schedule (AsyncTask &&task) override |
| | Schedule a coroutine, choosing an arena based on NUMA preference.
|
| |
| void | schedule (AsyncTask &&task, int numa_node) |
| | Schedule a coroutine on a specific NUMA node.
|
| |
| std::size_t | scheduled_count_for (int numa_node) const noexcept |
| | Query how many tasks have been dispatched to a NUMA node.
|
| |
| | TbbNumaScheduler () |
| | Construct a scheduler that reflects the system's visible NUMA nodes.
|
| |
| | TbbNumaScheduler (std::vector< int > nodes) |
| | Construct a scheduler with an explicit set of NUMA nodes.
|
| |
template<class Function >
requires std::invocable<Function&, std::size_t> |
| void | execute_batch (std::size_t size, Function &&function) |
| | Execute a synchronous batch of independent lightweight work items.
|
| |
| virtual void | help_while_waiting (const WaitPredicate &is_ready) |
| | Allow a scheduler to advance queued work while a thread is blocking.
|
| |
| virtual void | wait_for (const WaitPredicate &is_ready) |
| | Block the calling thread until is_ready returns true.
|
| |
| virtual void | wait_for (WaitRequest const &request) |
| | Block until a structured wait request becomes ready.
|
| |
| | ~IAsyncScheduler () override=default |
| | Virtual destructor.
|
| |
| virtual | ~IScheduler ()=default |
| | Virtual destructor.
|
| |
NUMA-aware scheduler that balances work across per-node TBB arenas.
◆ TbbNumaScheduler() [1/2]
| uni20::async::TbbNumaScheduler::TbbNumaScheduler |
( |
| ) |
|
|
inline |
Construct a scheduler that reflects the system's visible NUMA nodes.
◆ TbbNumaScheduler() [2/2]
| uni20::async::TbbNumaScheduler::TbbNumaScheduler |
( |
std::vector< int > |
nodes | ) |
|
|
inlineexplicit |
Construct a scheduler with an explicit set of NUMA nodes.
- Parameters
-
| nodes | NUMA node identifiers to manage. |
◆ numa_nodes()
| const std::vector< int > & uni20::async::TbbNumaScheduler::numa_nodes |
( |
| ) |
const |
|
inlinenoexcept |
Access the NUMA nodes managed by this scheduler.
- Returns
- Constant reference to the node identifier list.
◆ pause()
| void uni20::async::TbbNumaScheduler::pause |
( |
| ) |
|
|
inlineoverridevirtual |
◆ resume()
| void uni20::async::TbbNumaScheduler::resume |
( |
| ) |
|
|
inlineoverridevirtual |
◆ run_all()
| void uni20::async::TbbNumaScheduler::run_all |
( |
| ) |
|
|
inline |
Drain all arenas by waiting for completion of pending work.
◆ schedule() [1/2]
| void uni20::async::TbbNumaScheduler::schedule |
( |
AsyncTask && |
task | ) |
|
|
inlineoverridevirtual |
◆ schedule() [2/2]
| void uni20::async::TbbNumaScheduler::schedule |
( |
AsyncTask && |
task, |
|
|
int |
numa_node |
|
) |
| |
|
inline |
Schedule a coroutine on a specific NUMA node.
- Parameters
-
| task | Coroutine to dispatch. |
| numa_node | Requested NUMA node identifier. |
◆ scheduled_count_for()
| std::size_t uni20::async::TbbNumaScheduler::scheduled_count_for |
( |
int |
numa_node | ) |
const |
|
inlinenoexcept |
Query how many tasks have been dispatched to a NUMA node.
- Parameters
-
| numa_node | NUMA node identifier to query. |
- Returns
- Count of tasks scheduled for that node.
The documentation for this class was generated from the following file: