diff --git a/source/elements/oneTBB/source/constrained_arena_helpers.rst b/source/elements/oneTBB/source/constrained_arena_helpers.rst new file mode 100644 index 000000000..d1ca86ac2 --- /dev/null +++ b/source/elements/oneTBB/source/constrained_arena_helpers.rst @@ -0,0 +1,38 @@ +.. SPDX-FileCopyrightText: 2025 Intel Corporation +.. +.. SPDX-License-Identifier: CC-BY-4.0 + +========================= +Constrained Arena Helpers +========================= +**[constrained_arena_helpers]** + +Helper interfaces to create and manage multiple ``task_arena`` objects with constraints. + +.. code:: cpp + + // Defined in header + + namespace oneapi { + namespace tbb { + std::vector create_numa_task_arenas( + oneapi::tbb::task_arena::constraints other_constraints = {}, + unsigned reserved_slots = 0); + } // namespace tbb + } // namespace oneapi + +Functions +--------- + +.. cpp:function:: std::vector create_numa_task_arenas(oneapi::tbb::task_arena::constraints other_constraints = {}, unsigned reserved_slots = 0) + + Returns a ``std::vector`` of ``task_arena`` objects, each bound to a separate NUMA node. + The number of created ``task_arena`` is equal to the number of NUMA nodes available on the system. + It optionally takes additional ``other_constraints`` argument to be applied to each created + ``task_arena``, ignoring ``numa_id`` value. The second optional ``reserved_slots`` argument + allows to reserve a number of slots in each created ``task_arena`` for application threads. + + .. note:: + + If error occurs during system topology parsing, returns ``std::vector`` containing single + ``task_arena`` object equivalent to ``task_arena(other_constraints, reserved_slots)``. diff --git a/source/elements/oneTBB/source/nested-aux-interfaces.rst b/source/elements/oneTBB/source/nested-aux-interfaces.rst index aa8441092..6628de363 100644 --- a/source/elements/oneTBB/source/nested-aux-interfaces.rst +++ b/source/elements/oneTBB/source/nested-aux-interfaces.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2025 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -9,6 +9,7 @@ .. toctree:: :maxdepth: 2 + constrained_arena_helpers.rst memory_allocation.rst mutual_exclusion.rst timing.rst