geopm  3.1.1.dev214+gba4f9f6d
GEOPM - Global Extensible Open Power Manager
geopm_policystore.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef GEOPM_POLICYSTORE_H_INCLUDE
7 #define GEOPM_POLICYSTORE_H_INCLUDE
8 
9 #include <stddef.h>
10 
11 #include "geopm_public.h"
12 
13 #ifdef __cplusplus
14 extern "C"
15 {
16 #endif
17 
24  int GEOPM_PUBLIC
25  geopm_policystore_connect(const char *data_path);
26 
31  int GEOPM_PUBLIC
33 
44  int GEOPM_PUBLIC
45  geopm_policystore_get_best(const char *agent_name, const char *profile_name,
46  size_t max_policy_vals, double *policy_vals);
47 
56  int GEOPM_PUBLIC
57  geopm_policystore_set_best(const char *agent_name, const char *profile_name,
58  size_t num_policy_vals, const double *policy_vals);
59 
67  int GEOPM_PUBLIC
68  geopm_policystore_set_default(const char *agent_name, size_t num_policy_vals,
69  const double *policy_vals);
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 #endif
int GEOPM_PUBLIC geopm_policystore_connect(const char *data_path)
Create a geopm policy store interface.
Definition: PolicyStore.cpp:33
int GEOPM_PUBLIC geopm_policystore_disconnect()
Destroy a geopm policy store interface and release its resources.
Definition: PolicyStore.cpp:51
int GEOPM_PUBLIC 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.
Definition: PolicyStore.cpp:64
int GEOPM_PUBLIC 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.
Definition: PolicyStore.cpp:92
int GEOPM_PUBLIC 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.
Definition: PolicyStore.cpp:112