geopm
3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
|
#include "PolicyStore.hpp"
#include <cmath>
#include <memory>
#include "geopm/Exception.hpp"
#include "PolicyStoreImp.hpp"
#include "geopm/Helper.hpp"
#include "geopm_error.h"
#include "geopm_policystore.h"
Namespaces | |
geopm | |
Functions | |
int | geopm_policystore_connect (const char *data_path) |
Create a geopm policy store interface. More... | |
int | geopm_policystore_disconnect () |
Destroy a geopm policy store interface and release its resources. More... | |
int | geopm_policystore_get_best (const char *agent_name, const char *profile_name, size_t max_policy_vals, double *policy_vals) |
Get the best known policy for a given agent and profile. More... | |
int | geopm_policystore_set_best (const char *agent_name, const char *profile_name, size_t num_policy_vals, const double *policy_vals) |
Set the best known policy for a given agent and profile. More... | |
int | geopm_policystore_set_default (const char *agent_name, size_t num_policy_vals, const double *policy_vals) |
Set the default policy for a given agent. More... | |
int geopm_policystore_connect | ( | const char * | data_path | ) |
Create a geopm policy store interface.
Connects to a data store, creating a one if does not exist already.
[in] | data_path | Path to the data store. |
int geopm_policystore_disconnect | ( | ) |
Destroy a geopm policy store interface and release its resources.
int geopm_policystore_get_best | ( | const char * | agent_name, |
const char * | profile_name, | ||
size_t | max_policy_vals, | ||
double * | policy_vals | ||
) |
Get the best known policy for a given agent and profile.
Gets the agent's default policy if no best policy has been reported.
[in] | agent_name | Name of the agent to find. |
[in] | profile_name | Name of the profile to find. |
[in] | max_policy_vals | Maximum number of values that can fit in policy_vals . |
[out] | policy_vals | Best known or default policy. |
int geopm_policystore_set_best | ( | const char * | agent_name, |
const char * | profile_name, | ||
size_t | num_policy_vals, | ||
const double * | policy_vals | ||
) |
Set the best known policy for a given agent and profile.
[in] | profile_name | Name of the profile. |
[in] | agent_name | Name of the agent. |
[in] | num_policy_vals | Number of values in policy_vals . |
[in] | policy_vals | New policy to apply. |
int geopm_policystore_set_default | ( | const char * | agent_name, |
size_t | num_policy_vals, | ||
const double * | policy_vals | ||
) |
Set the default policy for a given agent.
[in] | agent_name | Name of the agent. |
[in] | num_policy_vals | Number of values in policy_vals . |
[in] | policy_vals | Default policy to apply. |