geopm 3.2.1.dev535+ga96c120fc
GEOPM - Global Extensible Open Power Manager
Loading...
Searching...
No Matches
geopm::PlatformTopoImp Class Reference

#include <PlatformTopoImp.hpp>

Inheritance diagram for geopm::PlatformTopoImp:
Collaboration diagram for geopm::PlatformTopoImp:

Public Member Functions

 PlatformTopoImp ()
 PlatformTopoImp (const std::string &test_cache_file_name, std::shared_ptr< ServiceProxy > service_proxy)
virtual ~PlatformTopoImp ()=default
int num_domain (int domain_type) const override
 Number of domains on the platform of a particular geopm_domain_e type.
int domain_idx (int domain_type, int cpu_idx) const override
 Get the domain index for a particular domain type that contains the given Linux logical CPU index.
bool is_nested_domain (int inner_domain, int outer_domain) const override
 Check if one domain type is contained in another.
std::set< int > domain_nested (int inner_domain, int outer_domain, int outer_idx) const override
 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.
Public Member Functions inherited from geopm::PlatformTopo
 PlatformTopo ()=default
virtual ~PlatformTopo ()=default

Static Public Member Functions

static void create_cache ()
static void create_cache (const std::string &cache_file_name)
static void create_cache (const std::string &cache_file_name, const GPUTopo &gtopo)
Static Public Member Functions inherited from geopm::PlatformTopo
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.

Constructor & Destructor Documentation

◆ PlatformTopoImp() [1/2]

geopm::PlatformTopoImp::PlatformTopoImp ( )

◆ PlatformTopoImp() [2/2]

geopm::PlatformTopoImp::PlatformTopoImp ( const std::string & test_cache_file_name,
std::shared_ptr< ServiceProxy > service_proxy )

◆ ~PlatformTopoImp()

virtual geopm::PlatformTopoImp::~PlatformTopoImp ( )
virtualdefault

Member Function Documentation

◆ create_cache() [1/3]

void geopm::PlatformTopoImp::create_cache ( void )
static

◆ create_cache() [2/3]

void geopm::PlatformTopoImp::create_cache ( const std::string & cache_file_name)
static

◆ create_cache() [3/3]

void geopm::PlatformTopoImp::create_cache ( const std::string & cache_file_name,
const GPUTopo & gtopo )
static

◆ domain_idx()

int geopm::PlatformTopoImp::domain_idx ( int domain_type,
int cpu_idx ) const
overridevirtual

Get the domain index for a particular domain type that contains the given Linux logical CPU index.

Todo
Add support for package memory NIC and package GPUs to domain_idx() method.

Implements geopm::PlatformTopo.

◆ domain_nested()

std::set< int > geopm::PlatformTopoImp::domain_nested ( int inner_domain,
int outer_domain,
int outer_idx ) const
overridevirtual

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_domainThe contained domain type.
[in]outer_domainThe containing domain type.
[in]outer_idxThe containing domain index.
Returns
The set of domain indices for the inner domain that are within the indexed outer domain.

Implements geopm::PlatformTopo.

◆ is_nested_domain()

bool geopm::PlatformTopoImp::is_nested_domain ( int inner_domain,
int outer_domain ) const
overridevirtual

Check if one domain type is contained in another.

Parameters
[in]inner_domainThe contained domain type.
[in]outer_domainThe containing domain type.
Returns
True if the inner_domain is contained within the outer_domain.

Implements geopm::PlatformTopo.

◆ num_domain()

int geopm::PlatformTopoImp::num_domain ( int domain_type) const
overridevirtual

Number of domains on the platform of a particular geopm_domain_e type.

Implements geopm::PlatformTopo.


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