Visible to Intel only — GUID: GUID-E23B3A4E-021A-4EE6-ABB4-E1C1446FD46D
Visible to Intel only — GUID: GUID-E23B3A4E-021A-4EE6-ABB4-E1C1446FD46D
task_arena::constraints extensions
Description
These extensions allow to customize tbb::task_arena::constraints with the following properties:
On machines with Intel® Hybrid Technology set the preferred core type for threads working within the task arena.
Limit the maximum number of threads that can be scheduled to one core simultaneously.
API
Header
#include <oneapi/tbb/task_arena.h>
Synopsis
namespace oneapi { namespace tbb { class task_arena { public: struct constraints { constraints& set_numa_id(numa_node_id id); constraints& set_max_concurrency(int maximal_concurrency); constraints& set_core_type(core_type_id id); constraints& set_max_threads_per_core(int threads_number); numa_node_id numa_id = task_arena::automatic; int max_concurrency = task_arena::automatic; core_type_id core_type = task_arena::automatic; int max_threads_per_core = task_arena::automatic; }; // struct constraints }; // class task_arena } // namespace tbb } // namespace oneapi
Member Functions
constraints&set_numa_id(numa_node_idid)
Sets the numa_id field to the id.
Returns: Reference to *this.
constraints&set_max_concurrency(intmaximal_concurrency)
Sets the max_concurrency field to the maximal_concurrency.
Returns: Reference to *this.
constraints&set_core_type(core_type_idid)
Sets the core_type field to the id.
Returns: Reference to *this.
constraints&set_max_threads_per_core(intthreads_number)
Sets the max_threads_per_core field to the threads_number.
Returns: Reference to *this.
Member Objects
numa_node_idnuma_id
An integral logical index uniquely identifying a NUMA node. All threads joining the task_arena are bound to this NUMA node.
intmax_concurrency
The maximum number of threads that can participate in work processing within the task_arena at the same time.
core_type_idcore_type
An integral logical index uniquely identifying a core type. All threads joining the task_arena are bound to this core type.
intmax_threads_per_core
The maximum number of threads that can be scheduled to one core simultaneously.
See also: