Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::internal::numa_affinity_handler Class Reference
Collaboration diagram for tbb::internal::numa_affinity_handler:

Public Member Functions

 numa_affinity_handler (size_t size)
 
 ~numa_affinity_handler ()
 
void bind_thread_to_node (unsigned slot_num, unsigned numa_node_id)
 
void restore_previous_affinity_mask (unsigned slot_num)
 

Private Types

typedef std::vector< platform_topology::affinity_maskaffinity_masks_container
 

Private Attributes

affinity_masks_container affinity_backup
 

Detailed Description

Definition at line 224 of file tbbbind.cpp.

Member Typedef Documentation

◆ affinity_masks_container

Constructor & Destructor Documentation

◆ numa_affinity_handler()

tbb::internal::numa_affinity_handler::numa_affinity_handler ( size_t  size)
inline

Definition at line 231 of file tbbbind.cpp.

231  : affinity_backup(size) {
232  for (affinity_masks_container::iterator it = affinity_backup.begin();
233  it != affinity_backup.end(); it++) {
235  }
236  }

References affinity_backup, and tbb::internal::platform_topology::allocate_process_affinity_mask().

Here is the call graph for this function:

◆ ~numa_affinity_handler()

tbb::internal::numa_affinity_handler::~numa_affinity_handler ( )
inline

Definition at line 238 of file tbbbind.cpp.

238  {
239  for (affinity_masks_container::iterator it = affinity_backup.begin();
240  it != affinity_backup.end(); it++) {
242  }
243  }

References affinity_backup, and tbb::internal::platform_topology::free_affinity_mask().

Here is the call graph for this function:

Member Function Documentation

◆ bind_thread_to_node()

void tbb::internal::numa_affinity_handler::bind_thread_to_node ( unsigned  slot_num,
unsigned  numa_node_id 
)
inline

Definition at line 245 of file tbbbind.cpp.

245  {
246  __TBB_ASSERT(slot_num < affinity_backup.size(),
247  "The slot number is greater than the number of slots in the arena");
249  "Trying to get access to uninitialized platform_topology");
251 
254  }

References __TBB_ASSERT, affinity_backup, tbb::internal::platform_topology::get_node_affinity_mask(), tbb::internal::platform_topology::is_topology_parsed(), tbb::internal::platform_topology::set_new_affinity_mask(), and tbb::internal::platform_topology::store_current_affinity_mask().

Referenced by tbb::internal::numa_binding_observer::on_scheduler_entry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restore_previous_affinity_mask()

void tbb::internal::numa_affinity_handler::restore_previous_affinity_mask ( unsigned  slot_num)
inline

Definition at line 256 of file tbbbind.cpp.

256  {
258  "Trying to get access to uninitialized platform_topology");
260  };

References __TBB_ASSERT, affinity_backup, tbb::internal::platform_topology::is_topology_parsed(), and tbb::internal::platform_topology::set_new_affinity_mask().

Referenced by tbb::internal::numa_binding_observer::on_scheduler_exit().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ affinity_backup

affinity_masks_container tbb::internal::numa_affinity_handler::affinity_backup
private

The documentation for this class was generated from the following file:
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
tbb::internal::platform_topology::allocate_process_affinity_mask
static affinity_mask allocate_process_affinity_mask()
Definition: tbbbind.cpp:185
tbb::internal::platform_topology::is_topology_parsed
static bool is_topology_parsed()
Definition: tbbbind.cpp:70
tbb::internal::numa_affinity_handler::affinity_backup
affinity_masks_container affinity_backup
Definition: tbbbind.cpp:228
tbb::internal::platform_topology::free_affinity_mask
static void free_affinity_mask(affinity_mask mask_to_free)
Definition: tbbbind.cpp:190
tbb::internal::platform_topology::set_new_affinity_mask
static void set_new_affinity_mask(const_affinity_mask new_mask)
Definition: tbbbind.cpp:202
tbb::internal::platform_topology::store_current_affinity_mask
static void store_current_affinity_mask(affinity_mask current_mask)
Definition: tbbbind.cpp:194
tbb::internal::platform_topology::get_node_affinity_mask
static const_affinity_mask get_node_affinity_mask(int node_index)
Definition: tbbbind.cpp:206
size
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t size
Definition: ittnotify_static.h:94

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.