LLVM OpenMP 22.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 1269 of file kmp_affinity.h.
Enumerator | |
---|---|
initialized | |
not_initialized | |
initializing |
Definition at line 1288 of file kmp_affinity.h.
|
inline |
Definition at line 1307 of file kmp_affinity.h.
References depth, maxLevels, not_initialized, resizing, and uninitialized.
|
inline |
Definition at line 1300 of file kmp_affinity.h.
References __kmp_topology, i, level, and numPerLevel.
Referenced by init().
|
inline |
Definition at line 1310 of file kmp_affinity.h.
References __kmp_free, not_initialized, numPerLevel, and uninitialized.
Definition at line 1318 of file kmp_affinity.h.
References __kmp_allocate, __kmp_topology, base_num_threads, d, depth, deriveLevels(), i, initialized, initializing, KMP_COMPARE_AND_STORE_ACQ8, KMP_CPU_PAUSE, KMP_DEBUG_ASSERT, kmp_int8, kmp_uint32, maxLeaves, maxLevels, minBranch, not_initialized, numPerLevel, resizing, skipPerLevel, TCR_1, and uninitialized.
|
inline |
Definition at line 1392 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, kmp_uint32, maxLevels, numPerLevel, resizing, and skipPerLevel.
kmp_uint32 hierarchy_info::base_num_threads = 0 |
Definition at line 1287 of file kmp_affinity.h.
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 1286 of file kmp_affinity.h.
Referenced by hierarchy_info(), init(), and resize().
|
static |
Definition at line 1273 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 1280 of file kmp_affinity.h.
Referenced by hierarchy_info(), init(), and resize().
|
static |
Definition at line 1274 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 1297 of file kmp_affinity.h.
Referenced by deriveLevels(), fini(), init(), and resize().
volatile kmp_int8 hierarchy_info::resizing |
Definition at line 1291 of file kmp_affinity.h.
Referenced by hierarchy_info(), init(), and resize().
kmp_uint32* hierarchy_info::skipPerLevel = nullptr |
Definition at line 1298 of file kmp_affinity.h.
volatile kmp_int8 hierarchy_info::uninitialized |
Definition at line 1289 of file kmp_affinity.h.
Referenced by fini(), hierarchy_info(), and init().