Visible to Intel only — GUID: GUID-6F52DF06-FFF4-4653-9F3B-16452E37F9AF
Visible to Intel only — GUID: GUID-6F52DF06-FFF4-4653-9F3B-16452E37F9AF
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: