LLVM OpenMP* Runtime Library
Public Attributes | Static Public Attributes | List of all members
hierarchy_info Class Reference

#include <kmp_affinity.h>

Public Attributes

kmp_uint32 maxLevels
 
kmp_uint32 depth
 
kmp_uint32 * numPerLevel
 

Static Public Attributes

static const kmp_uint32 maxLeaves =4
 

Detailed Description

A structure for holding machine-specific hierarchy info to be computed once at init. This structure represents a mapping of threads to the actual machine hierarchy, or to our best guess at what the hierarchy might be, for the purpose of performing an efficient barrier. In the worst case, when there is no machine hierarchy information, it produces a tree suitable for a barrier, similar to the tree used in the hyper barrier.

Definition at line 146 of file kmp_affinity.h.

Member Data Documentation

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 161 of file kmp_affinity.h.

const kmp_uint32 hierarchy_info::maxLeaves =4
static

Good default values for number of leaves and branching factor, given no affinity information. Behaves a bit like hyper barrier.

Definition at line 150 of file kmp_affinity.h.

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 156 of file kmp_affinity.h.

kmp_uint32* hierarchy_info::numPerLevel

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 170 of file kmp_affinity.h.


The documentation for this class was generated from the following file: