#include <PlatformTopo.hpp>
|
| | PlatformTopo ()=default |
| |
| virtual | ~PlatformTopo ()=default |
| |
| virtual int | num_domain (int domain_type) const =0 |
| | Number of domains on the platform of a particular geopm_domain_e type.
|
| |
| virtual int | domain_idx (int domain_type, int cpu_idx) const =0 |
| | Get the domain index for a particular domain type that contains the given Linux logical CPU index.
|
| |
| virtual bool | is_nested_domain (int inner_domain, int outer_domain) const =0 |
| | Check if one domain type is contained in another.
|
| |
| virtual std::set< int > | domain_nested (int inner_domain, int outer_domain, int outer_idx) const =0 |
| | Get the set of smaller domains contained in a larger one. If the inner domain is not the same as or contained within the outer domain, it throws an error.
|
| |
|
| static std::string | domain_type_to_name (int domain_type) |
| | Convert a domain type enum to a string.
|
| |
| static int | domain_name_to_type (const std::string &domain_name) |
| | Convert a domain name to its corresponding enum.
|
| |
| static void | create_cache (void) |
| | Create cache file in tmpfs that can be read instead of popen() call.
|
| |
◆ PlatformTopo()
| geopm::PlatformTopo::PlatformTopo |
( |
| ) |
|
|
default |
◆ ~PlatformTopo()
| virtual geopm::PlatformTopo::~PlatformTopo |
( |
| ) |
|
|
virtualdefault |
◆ create_cache()
| void geopm::PlatformTopo::create_cache |
( |
void |
| ) |
|
|
static |
Create cache file in tmpfs that can be read instead of popen() call.
◆ domain_idx()
| virtual int geopm::PlatformTopo::domain_idx |
( |
int |
domain_type, |
|
|
int |
cpu_idx |
|
) |
| const |
|
pure virtual |
Get the domain index for a particular domain type that contains the given Linux logical CPU index.
Implemented in geopm::PlatformTopoImp.
◆ domain_name_to_type()
| int geopm::PlatformTopo::domain_name_to_type |
( |
const std::string & |
domain_name | ) |
|
|
static |
Convert a domain name to its corresponding enum.
- Parameters
-
| [in] | name | Domain name which is the enum in lowercase with GEOPM_DOMAIN_ prefix removed. |
- Returns
- Domain type from the geopm_domain_e enum.
◆ domain_nested()
| virtual std::set< int > geopm::PlatformTopo::domain_nested |
( |
int |
inner_domain, |
|
|
int |
outer_domain, |
|
|
int |
outer_idx |
|
) |
| const |
|
pure virtual |
Get the set of smaller domains contained in a larger one. If the inner domain is not the same as or contained within the outer domain, it throws an error.
- Parameters
-
| [in] | inner_domain | The contained domain type. |
| [in] | outer_domain | The containing domain type. |
| [in] | outer_idx | The containing domain index. |
- Returns
- The set of domain indices for the inner domain that are within the indexed outer domain.
Implemented in geopm::PlatformTopoImp.
◆ domain_type_to_name()
| std::string geopm::PlatformTopo::domain_type_to_name |
( |
int |
domain_type | ) |
|
|
static |
Convert a domain type enum to a string.
These strings are used by the geopmread and geopmwrite tools.
- Parameters
-
| [in] | domain_type | Domain type from the geopm_domain_e enum. |
- Returns
- Domain name which is the enum name in lowercase with GEOPM_DOMAIN_ prefix removed.
◆ is_nested_domain()
| virtual bool geopm::PlatformTopo::is_nested_domain |
( |
int |
inner_domain, |
|
|
int |
outer_domain |
|
) |
| const |
|
pure virtual |
Check if one domain type is contained in another.
- Parameters
-
| [in] | inner_domain | The contained domain type. |
| [in] | outer_domain | The containing domain type. |
- Returns
- True if the inner_domain is contained within the outer_domain.
Implemented in geopm::PlatformTopoImp.
◆ num_domain()
| virtual int geopm::PlatformTopo::num_domain |
( |
int |
domain_type | ) |
const |
|
pure virtual |
The documentation for this class was generated from the following files: