#include <FrequencyGovernor.hpp>
|
| | FrequencyGovernor ()=default |
| |
| virtual | ~FrequencyGovernor ()=default |
| |
| virtual void | init_platform_io (void)=0 |
| | Registers signals and controls with PlatformIO using the default control domain.
|
| |
| virtual int | frequency_domain_type (void) const =0 |
| | Get the domain type of frequency control on the platform. Users of the FrequencyGovernor can use this information to determine the size of the vector to pass to adjust_platform().
|
| |
| virtual void | set_domain_type (int domain_type)=0 |
| | Set the domain type of frequency control that will be used in adjust_platform(). Must be called before init_platform_io().
|
| |
| virtual void | adjust_platform (const std::vector< double > &frequency_request)=0 |
| | Write frequency control, may be clamped between min and max frequency if request cannot be satisfied.
|
| |
| virtual bool | do_write_batch (void) const =0 |
| | Returns true if last call to adjust_platform requires writing.
|
| |
| virtual bool | set_frequency_bounds (double freq_min, double freq_max)=0 |
| | Sets min and max package bounds. The defaults before calling this method are the min and max frequency for the platform.
|
| |
| virtual double | get_frequency_min () const =0 |
| | Returns the current min frequency used by the governor.
|
| |
| virtual double | get_frequency_max () const =0 |
| | Returns the current max frequency used by the governor.
|
| |
| virtual double | get_frequency_step () const =0 |
| | Returns the frequency step for the platform.
|
| |
| virtual int | get_clamp_count () const =0 |
| | Returns the number of clamping occurrence count for the platform.
|
| |
| virtual void | validate_policy (double &freq_min, double &freq_max) const =0 |
| | Checks that the minimum and maximum frequency are within range for the platform. If not, they will be clamped at the min and max for the platform.
|
| |
|
| static std::unique_ptr< FrequencyGovernor > | make_unique (void) |
| | Returns a unique_ptr to a concrete object constructed using the underlying implementation.
|
| |
| static std::shared_ptr< FrequencyGovernor > | make_shared (void) |
| | Returns a shared_ptr to a concrete object constructed using the underlying implementation.
|
| |
◆ FrequencyGovernor()
| geopm::FrequencyGovernor::FrequencyGovernor |
( |
| ) |
|
|
default |
◆ ~FrequencyGovernor()
| virtual geopm::FrequencyGovernor::~FrequencyGovernor |
( |
| ) |
|
|
virtualdefault |
◆ adjust_platform()
| virtual void geopm::FrequencyGovernor::adjust_platform |
( |
const std::vector< double > & |
frequency_request | ) |
|
|
pure virtual |
Write frequency control, may be clamped between min and max frequency if request cannot be satisfied.
- Parameters
-
| [in] | frequency_request | Desired per domain frequency. |
Implemented in geopm::FrequencyGovernorImp.
◆ do_write_batch()
| virtual bool geopm::FrequencyGovernor::do_write_batch |
( |
void |
| ) |
const |
|
pure virtual |
Returns true if last call to adjust_platform requires writing.
- Returns
- True if platform adjustments have been made, false otherwise.
Implemented in geopm::FrequencyGovernorImp.
◆ frequency_domain_type()
| virtual int geopm::FrequencyGovernor::frequency_domain_type |
( |
void |
| ) |
const |
|
pure virtual |
◆ get_clamp_count()
| virtual int geopm::FrequencyGovernor::get_clamp_count |
( |
| ) |
const |
|
pure virtual |
Returns the number of clamping occurrence count for the platform.
- Returns
- Clamp occurrence counter
Implemented in geopm::FrequencyGovernorImp.
◆ get_frequency_max()
| virtual double geopm::FrequencyGovernor::get_frequency_max |
( |
| ) |
const |
|
pure virtual |
◆ get_frequency_min()
| virtual double geopm::FrequencyGovernor::get_frequency_min |
( |
| ) |
const |
|
pure virtual |
◆ get_frequency_step()
| virtual double geopm::FrequencyGovernor::get_frequency_step |
( |
| ) |
const |
|
pure virtual |
◆ init_platform_io()
| virtual void geopm::FrequencyGovernor::init_platform_io |
( |
void |
| ) |
|
|
pure virtual |
◆ make_shared()
Returns a shared_ptr to a concrete object constructed using the underlying implementation.
◆ make_unique()
Returns a unique_ptr to a concrete object constructed using the underlying implementation.
◆ set_domain_type()
| virtual void geopm::FrequencyGovernor::set_domain_type |
( |
int |
domain_type | ) |
|
|
pure virtual |
Set the domain type of frequency control that will be used in adjust_platform(). Must be called before init_platform_io().
- Exceptions
-
| Exception | the requested domain does not contain the frequency control's native domain. |
| Exception | The caller attempted to set the domain type after this governor initialized its PlatformIO controls. |
Implemented in geopm::FrequencyGovernorImp.
◆ set_frequency_bounds()
| virtual bool geopm::FrequencyGovernor::set_frequency_bounds |
( |
double |
freq_min, |
|
|
double |
freq_max |
|
) |
| |
|
pure virtual |
Sets min and max package bounds. The defaults before calling this method are the min and max frequency for the platform.
- Parameters
-
| [in] | freq_min | Minimum frequency value for the control domain. |
| [in] | freq_max | Maximum frequency value for the control domain. |
- Returns
- Returns true if internal state updated, otherwise false.
Implemented in geopm::FrequencyGovernorImp.
◆ validate_policy()
| virtual void geopm::FrequencyGovernor::validate_policy |
( |
double & |
freq_min, |
|
|
double & |
freq_max |
|
) |
| const |
|
pure virtual |
Checks that the minimum and maximum frequency are within range for the platform. If not, they will be clamped at the min and max for the platform.
- Parameters
-
| [in,out] | freq_min | Minimum frequency to attempt to set, and resulting valid minimum. |
| [in,out] | freq_max | Maximum frequency to attempt to set, and resulting valid maximum. |
Implemented in geopm::FrequencyGovernorImp.
The documentation for this class was generated from the following files: