LLVM OpenMP 20.0.0git
|
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/openmp/runtime/src/kmp_affinity.h"
Public Types | |
enum | init_status { initialized = 0 , not_initialized = 1 , initializing = 2 } |
Public Member Functions | |
void | deriveLevels () |
hierarchy_info () | |
void | fini () |
void | init (int num_addrs) |
void | resize (kmp_uint32 nproc) |
Public Attributes | |
kmp_uint32 | maxLevels |
Number of levels in the hierarchy. | |
kmp_uint32 | depth |
This is specifically the depth of the machine configuration hierarchy, in terms of the number of levels along the longest path from root to any leaf. | |
kmp_uint32 | base_num_threads = 0 |
volatile kmp_int8 | uninitialized |
volatile kmp_int8 | resizing |
kmp_uint32 * | numPerLevel = nullptr |
Level 0 corresponds to leaves. | |
kmp_uint32 * | skipPerLevel = nullptr |
Static Public Attributes | |
static const kmp_uint32 | maxLeaves = 4 |
static const kmp_uint32 | minBranch = 4 |
Definition at line 1258 of file kmp_affinity.h.
Enumerator | |
---|---|
initialized | |
not_initialized | |
initializing |
Definition at line 1277 of file kmp_affinity.h.
|
inline |
Definition at line 1296 of file kmp_affinity.h.
|
inline |
Definition at line 1289 of file kmp_affinity.h.
References __kmp_topology, kmp_topology_t::get_depth(), kmp_topology_t::get_ratio(), i, level, and numPerLevel.
Referenced by init().
|
inline |
Definition at line 1299 of file kmp_affinity.h.
References __kmp_free, not_initialized, numPerLevel, and uninitialized.
Referenced by __kmp_cleanup_hierarchy().
Definition at line 1307 of file kmp_affinity.h.
References __kmp_allocate, __kmp_topology, base_num_threads, d, depth, deriveLevels(), kmp_topology_t::get_depth(), i, initialized, initializing, KMP_COMPARE_AND_STORE_ACQ8, KMP_CPU_PAUSE, KMP_DEBUG_ASSERT, kmp_int8, maxLeaves, maxLevels, minBranch, not_initialized, numPerLevel, resizing, skipPerLevel, TCR_1, and uninitialized.
Referenced by __kmp_get_hierarchy().
|
inline |
Definition at line 1381 of file kmp_affinity.h.
References __kmp_allocate, __kmp_free, base_num_threads, depth, i, KMP_COMPARE_AND_STORE_ACQ8, KMP_CPU_PAUSE, KMP_DEBUG_ASSERT, kmp_int8, maxLevels, numPerLevel, resizing, and skipPerLevel.
Referenced by __kmp_get_hierarchy().
kmp_uint32 hierarchy_info::base_num_threads = 0 |
Definition at line 1276 of file kmp_affinity.h.
Referenced by __kmp_get_hierarchy(), init(), and resize().
kmp_uint32 hierarchy_info::depth |
This is specifically the depth of the machine configuration hierarchy, in terms of the number of levels along the longest path from root to any leaf.
It corresponds to the number of entries in numPerLevel if we exclude all but one trailing 1.
Definition at line 1275 of file kmp_affinity.h.
Referenced by __kmp_get_hierarchy(), init(), and resize().
|
static |
Definition at line 1262 of file kmp_affinity.h.
Referenced by init().
kmp_uint32 hierarchy_info::maxLevels |
Number of levels in the hierarchy.
Typical levels are threads/core, cores/package or socket, packages/node, nodes/machine, etc. We don't want to get specific with nomenclature. When the machine is oversubscribed we add levels to duplicate the hierarchy, doubling the thread capacity of the hierarchy each time we add a level.
Definition at line 1269 of file kmp_affinity.h.
|
static |
Definition at line 1263 of file kmp_affinity.h.
Referenced by init().
kmp_uint32* hierarchy_info::numPerLevel = nullptr |
Level 0 corresponds to leaves.
numPerLevel[i] is the number of children the parent of a node at level i has. For example, if we have a machine with 4 packages, 4 cores/package and 2 HT per core, then numPerLevel = {2, 4, 4, 1, 1}. All empty levels are set to 1.
Definition at line 1286 of file kmp_affinity.h.
Referenced by __kmp_get_hierarchy(), deriveLevels(), fini(), init(), and resize().
volatile kmp_int8 hierarchy_info::resizing |
Definition at line 1280 of file kmp_affinity.h.
kmp_uint32* hierarchy_info::skipPerLevel = nullptr |
Definition at line 1287 of file kmp_affinity.h.
Referenced by __kmp_get_hierarchy(), init(), and resize().
volatile kmp_int8 hierarchy_info::uninitialized |
Definition at line 1278 of file kmp_affinity.h.
Referenced by __kmp_get_hierarchy(), fini(), and init().