LLVM OpenMP 20.0.0git
Classes | Public Member Functions | Static Public Member Functions | List of all members
kmp_topology_t Class Reference

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/openmp/runtime/src/kmp_affinity.h"

Public Member Functions

 kmp_topology_t ()=delete
 
 kmp_topology_t (const kmp_topology_t &t)=delete
 
 kmp_topology_t (kmp_topology_t &&t)=delete
 
kmp_topology_toperator= (const kmp_topology_t &t)=delete
 
kmp_topology_toperator= (kmp_topology_t &&t)=delete
 
kmp_hw_thread_tat (int index)
 
const kmp_hw_thread_tat (int index) const
 
int get_num_hw_threads () const
 
void sort_ids ()
 
void insert_layer (kmp_hw_t type, const int *ids)
 
bool check_ids () const
 
void canonicalize ()
 
void canonicalize (int pkgs, int cores_per_pkg, int thr_per_core, int cores)
 
bool is_uniform () const
 
kmp_hw_t get_equivalent_type (kmp_hw_t type) const
 
void set_equivalent_type (kmp_hw_t type1, kmp_hw_t type2)
 
int calculate_ratio (int level1, int level2) const
 
int get_ratio (int level) const
 
int get_depth () const
 
kmp_hw_t get_type (int level) const
 
int get_level (kmp_hw_t type) const
 
int get_count (int level) const
 
int get_ncores_with_attr (const kmp_hw_attr_t &attr) const
 
int get_ncores_with_attr_per (const kmp_hw_attr_t &attr, int above) const
 
void print (const char *env_var="KMP_AFFINITY") const
 
void dump () const
 

Static Public Member Functions

static kmp_topology_tallocate (int nproc, int ndepth, const kmp_hw_t *types)
 
static void deallocate (kmp_topology_t *)
 

Detailed Description

Definition at line 863 of file kmp_affinity.h.

Constructor & Destructor Documentation

◆ kmp_topology_t() [1/3]

kmp_topology_t::kmp_topology_t ( )
delete

Referenced by allocate().

◆ kmp_topology_t() [2/3]

kmp_topology_t::kmp_topology_t ( const kmp_topology_t t)
delete

◆ kmp_topology_t() [3/3]

kmp_topology_t::kmp_topology_t ( kmp_topology_t &&  t)
delete

Member Function Documentation

◆ allocate()

kmp_topology_t * kmp_topology_t::allocate ( int  nproc,
int  ndepth,
const kmp_hw_t types 
)
static

◆ at() [1/2]

kmp_hw_thread_t & kmp_topology_t::at ( int  index)
inline

Definition at line 957 of file kmp_affinity.h.

References KMP_DEBUG_ASSERT.

◆ at() [2/2]

const kmp_hw_thread_t & kmp_topology_t::at ( int  index) const
inline

Definition at line 961 of file kmp_affinity.h.

References KMP_DEBUG_ASSERT.

◆ calculate_ratio()

int kmp_topology_t::calculate_ratio ( int  level1,
int  level2 
) const
inline

Definition at line 1017 of file kmp_affinity.h.

References KMP_DEBUG_ASSERT, level, and r.

◆ canonicalize() [1/2]

void kmp_topology_t::canonicalize ( )

◆ canonicalize() [2/2]

void kmp_topology_t::canonicalize ( int  pkgs,
int  cores_per_pkg,
int  thr_per_core,
int  cores 
)

◆ check_ids()

bool kmp_topology_t::check_ids ( ) const

Definition at line 677 of file kmp_affinity.cpp.

References i, kmp_hw_thread_t::ids, and j.

◆ deallocate()

void kmp_topology_t::deallocate ( kmp_topology_t topology)
static

Definition at line 672 of file kmp_affinity.cpp.

References __kmp_free.

◆ dump()

void kmp_topology_t::dump ( ) const

◆ get_count()

int kmp_topology_t::get_count ( int  level) const
inline

Definition at line 1044 of file kmp_affinity.h.

References count, KMP_DEBUG_ASSERT, and level.

Referenced by __kmp_set_nesting_mode_threads(), and print().

◆ get_depth()

int kmp_topology_t::get_depth ( ) const
inline

◆ get_equivalent_type()

kmp_hw_t kmp_topology_t::get_equivalent_type ( kmp_hw_t  type) const
inline

Definition at line 994 of file kmp_affinity.h.

References KMP_HW_UNKNOWN, and type.

Referenced by kmp_hw_subset_t::canonicalize().

◆ get_level()

int kmp_topology_t::get_level ( kmp_hw_t  type) const
inline

◆ get_ncores_with_attr()

int kmp_topology_t::get_ncores_with_attr ( const kmp_hw_attr_t attr) const
inline

Definition at line 1049 of file kmp_affinity.h.

Referenced by print().

◆ get_ncores_with_attr_per()

int kmp_topology_t::get_ncores_with_attr_per ( const kmp_hw_attr_t attr,
int  above 
) const
inline

Definition at line 1054 of file kmp_affinity.h.

◆ get_num_hw_threads()

int kmp_topology_t::get_num_hw_threads ( ) const
inline

Definition at line 965 of file kmp_affinity.h.

◆ get_ratio()

int kmp_topology_t::get_ratio ( int  level) const
inline

Definition at line 1025 of file kmp_affinity.h.

References KMP_DEBUG_ASSERT, and level.

Referenced by __kmp_set_nesting_mode_threads(), hierarchy_info::deriveLevels(), and print().

◆ get_type()

kmp_hw_t kmp_topology_t::get_type ( int  level) const
inline

Definition at line 1030 of file kmp_affinity.h.

References KMP_DEBUG_ASSERT, and level.

Referenced by kmp_hw_thread_t::compare_ids().

◆ insert_layer()

void kmp_topology_t::insert_layer ( kmp_hw_t  type,
const int ids 
)

Definition at line 286 of file kmp_affinity.cpp.

References i, kmp_hw_thread_t::ids, j, type, and kmp_hw_thread_t::UNKNOWN_ID.

◆ is_uniform()

bool kmp_topology_t::is_uniform ( ) const
inline

Definition at line 991 of file kmp_affinity.h.

Referenced by dump(), and print().

◆ operator=() [1/2]

kmp_topology_t & kmp_topology_t::operator= ( const kmp_topology_t t)
delete

◆ operator=() [2/2]

kmp_topology_t & kmp_topology_t::operator= ( kmp_topology_t &&  t)
delete

◆ print()

void kmp_topology_t::print ( const char env_var = "KMP_AFFINITY") const

◆ set_equivalent_type()

void kmp_topology_t::set_equivalent_type ( kmp_hw_t  type1,
kmp_hw_t  type2 
)
inline

Definition at line 1000 of file kmp_affinity.h.

References KMP_DEBUG_ASSERT_VALID_HW_TYPE, KMP_FOREACH_HW_TYPE, KMP_HW_UNKNOWN, and type.

Referenced by canonicalize().

◆ sort_ids()

void kmp_topology_t::sort_ids ( )
inline

Definition at line 966 of file kmp_affinity.h.

References kmp_hw_thread_t::compare_ids().


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