|
| 1 | +.. SPDX-FileCopyrightText: 2025 Intel Corporation |
| 2 | +.. |
| 3 | +.. SPDX-License-Identifier: CC-BY-4.0 |
| 4 | +
|
| 5 | +========================= |
| 6 | +Constrained Arena Helpers |
| 7 | +========================= |
| 8 | +**[constrained_arena_helpers]** |
| 9 | +Helper interfaces to create and manage multiple ``task_arena`` objects with constraints. |
| 10 | + |
| 11 | +.. code:: cpp |
| 12 | +
|
| 13 | + // Defined in header <oneapi/tbb/task_arena.h> |
| 14 | +
|
| 15 | + namespace oneapi { |
| 16 | + namespace tbb { |
| 17 | + std::vector<oneapi::tbb::task_arena> create_numa_task_arenas( |
| 18 | + oneapi::tbb::task_arena::constraints other_constraints = {}, |
| 19 | + unsigned reserved_slots = 0); |
| 20 | + } // namespace tbb |
| 21 | + } // namespace oneapi |
| 22 | +
|
| 23 | +Functions |
| 24 | +--------- |
| 25 | + |
| 26 | +.. cpp:function:: std::vector<oneapi::tbb::task_arena> create_numa_task_arenas( |
| 27 | + oneapi::tbb::task_arena::constraints other_constraints = {}, |
| 28 | + unsigned reserved_slots = 0) |
| 29 | + |
| 30 | + Returns a ``std::vector`` of ``task_arena`` objects, each bound to a separate NUMA node. |
| 31 | + The number of created ``task_arena`` is equal to the number of NUMA nodes available on the system. |
| 32 | + It optionally takes additional ``other_constraints`` argument to be applied to each created |
| 33 | + ``task_arena``, ignoring ``numa_id`` value. The second optional ``reserved_slots`` argument |
| 34 | + allows to reserve a number of slots in each created ``task_arena`` for application threads. |
| 35 | + |
| 36 | + .. note:: |
| 37 | + If error occurs during system topology parsing, returns ``std::vector`` containing single |
| 38 | + ``task_arena`` object equivalent to ``task_arena(other_constraints, reserved_slots)``. |
0 commit comments