|
C Configuration Space and Tuning Library (CCS)
|
A CCS tuner defines an ask and tell interface to optimize an objective space (see objective_space.h). More...

Go to the source code of this file.
Data Structures | |
| struct | ccs_user_defined_tuner_vector_s |
| A structure that define the callbacks the user must provide to create a user defined tuner. More... | |
Typedefs | |
| typedef enum ccs_tuner_type_e | ccs_tuner_type_t |
| A commodity type to represent CCS tuner types. | |
| typedef struct ccs_user_defined_tuner_vector_s | ccs_user_defined_tuner_vector_t |
| a commodity type to represent a user defined tuner callback vector. | |
Enumerations | |
| enum | ccs_tuner_type_e { CCS_TUNER_TYPE_RANDOM , CCS_TUNER_TYPE_USER_DEFINED , CCS_TUNER_TYPE_MAX , CCS_TUNER_TYPE_32BIT = INT_MAX } |
| CCS supported tuner types. More... | |
Functions | |
| ccs_result_t | ccs_tuner_get_type (ccs_tuner_t tuner, ccs_tuner_type_t *type_ret) |
| Get the type of a tuner. | |
| ccs_result_t | ccs_tuner_get_name (ccs_tuner_t tuner, const char **name_ret) |
| Get the name of a tuner. | |
| ccs_result_t | ccs_tuner_get_search_space (ccs_tuner_t tuner, ccs_search_space_t *search_space_ret) |
| Get the associated search space. | |
| ccs_result_t | ccs_tuner_get_objective_space (ccs_tuner_t tuner, ccs_objective_space_t *objective_space_ret) |
| Get the associated objective space. | |
| ccs_result_t | ccs_tuner_get_feature_space (ccs_tuner_t tuner, ccs_feature_space_t *feature_space_ret) |
| Get the associated feature space. | |
| ccs_result_t | ccs_tuner_ask (ccs_tuner_t tuner, ccs_features_t features, size_t num_configurations, ccs_search_configuration_t *configurations, size_t *num_configurations_ret) |
| Ask a tuner for a set of configurations to evaluate. | |
| ccs_result_t | ccs_tuner_tell (ccs_tuner_t tuner, size_t num_evaluations, ccs_evaluation_t *evaluations) |
| Give a list of results to a tuner through evaluations. | |
| ccs_result_t | ccs_tuner_suggest (ccs_tuner_t tuner, ccs_features_t features, ccs_search_configuration_t *configuration) |
| Ask a tuner to suggest a good configuration. | |
| ccs_result_t | ccs_tuner_get_optima (ccs_tuner_t tuner, ccs_features_t features, size_t num_evaluations, ccs_evaluation_t *evaluations, size_t *num_evaluations_ret) |
| Ask a tuner for the discovered Pareto front. | |
| ccs_result_t | ccs_tuner_get_history (ccs_tuner_t tuner, ccs_features_t features, size_t num_evaluations, ccs_evaluation_t *evaluations, size_t *num_evaluations_ret) |
| Ask a tuner for the evaluation history. | |
| ccs_result_t | ccs_create_random_tuner (const char *name, ccs_objective_space_t objective_space, ccs_tuner_t *tuner_ret) |
| Create a new random tuner. | |
| ccs_result_t | ccs_create_user_defined_tuner (const char *name, ccs_objective_space_t objective_space, ccs_user_defined_tuner_vector_t *vector, void *tuner_data, ccs_tuner_t *tuner_ret) |
| Create a new user defined tuner. | |
| ccs_result_t | ccs_user_defined_tuner_get_tuner_data (ccs_tuner_t tuner, void **tuner_data_ret) |
| Get the user defined tuner internal data pointer. | |
A CCS tuner defines an ask and tell interface to optimize an objective space (see objective_space.h).
The tuner will propose search configurations (see search_configuration.h) and the user will return evaluations (see evaluation.h).
| enum ccs_tuner_type_e |
|
extern |
Create a new random tuner.
The random tuner should be viewed as a baseline for evaluating tuners, and as a tool for developing interfaces.
| [in] | name | the name of the tuner |
| [in] | objective_space | the objective space to optimize |
| [out] | tuner_ret | a pointer to the variable that will contain the newly created tuner |
objective_space is not a valid CCS objective space name is NULL; or if tuner_ret is NULL
|
extern |
Create a new user defined tuner.
| [in] | name | the name of the tuner |
| [in] | objective_space | the objective space to optimize |
| [in] | vector | the vector of callbacks implementing the tuner interface |
| [in] | tuner_data | a pointer to the tuner internal data structures. Can be NULL |
| [out] | tuner_ret | a pointer to the variable that will contain the newly created tuner |
objective_space is not a valid CCS objective space name is NULL; or if tuner_ret is NULL; or if vector is NULL; or if any non optional interface pointer is NULL
|
extern |
Ask a tuner for a set of configurations to evaluate.
Configuration's ownership is transferred to the user who doesn't need to retain them, but will need to release them once the user is done using them.
| [in,out] | tuner | |
| [in] | features | the specific features to ask the configurations for |
| [in] | num_configurations | the number of configurations requested by the user |
| [out] | configurations | an array of num_configurations configurations that will contain the returned configurations. Can be NULL |
| [out] | num_configurations_ret | a pointer to the variable that will contain the number of configuration that are returned, or, if configurations is NULL, a suggestion for the number of configuration to ask for |
tuner is not a valid CCS tuner; or if features is not a valid CCS features features is not a valid CCS features for the tuner feature space configurations is NULL and num_configurations is greater than 0; or if configurations and num_configurations_ret are both NULL
|
extern |
Get the associated feature space.
| [in] | tuner | |
| [out] | feature_space_ret | a pointer to the variable that will contain the feature space |
tuner is not a valid CCS tuner feature_space_ret is NULL
|
extern |
Ask a tuner for the evaluation history.
| [in] | tuner | |
| [in] | features | the specific features to get the history for. Optional, can be NULL |
| [in] | num_evaluations | the size of the evaluations array |
| [out] | evaluations | an array of num_evaluations that will contain the the history. If features is given, only return history of evaluations for the given features |
| [out] | num_evaluations_ret | a pointer to the variable that will contain the number of evaluations that are or would be returned |
tuner is not a valid CCS tuner; or if features is not NULL and features is not a valid CCS features features is not a valid CCS features for the tuner feature space evaluations is NULL and num_evaluations is greater than 0; or if evaluations is NULL and num_evaluations_ret is NULL
|
extern |
Get the name of a tuner.
| [in] | tuner | |
| [out] | name_ret | a pointer to the variable that will contain a pointer to the name of the tuner |
name_ret is NULL tuner is not a valid CCS tuner
|
extern |
Get the associated objective space.
| [in] | tuner | |
| [out] | objective_space_ret | a pointer to the variable that will contain the objective space |
tuner is not a valid CCS tuner objective_space_ret is NULL
|
extern |
Ask a tuner for the discovered Pareto front.
For single objective spaces this would be the best point found.
| [in] | tuner | |
| [in] | features | the specific features to get the optimal values for. Optional, can be NULL |
| [in] | num_evaluations | the size of the evaluations array |
| [out] | evaluations | an array of num_evaluations that will contain the optimal evaluations. If features is given, only return optimal evaluations for the given features |
| [out] | num_evaluations_ret | a pointer to the variable that will contain the number of evaluations that are or would be returned |
tuner is not a valid CCS tuner; or if features is not NULL and features is not a valid CCS features features is not a valid CCS features for the tuner feature space evaluations is NULL and num_evaluations is greater than 0; or if evaluations is NULL and num_evaluations_ret is NULL
|
extern |
Get the associated search space.
| [in] | tuner | |
| [out] | search_space_ret | a pointer to the variable that will contain the search space |
tuner is not a valid CCS tuner search_space_ret is NULL
|
extern |
Get the type of a tuner.
| [in] | tuner | |
| [out] | type_ret | a pointer to the variable that will contain the returned tuner type |
tuner is not a valid CCS tuner type_ret is NULL
|
extern |
Ask a tuner to suggest a good configuration.
| [in,out] | tuner | |
| [in] | features | the specific features to suggest a configuration for |
| [out] | configuration | a pointer to the variable that will contain the suggested configuration |
tuner is not a valid CCS tuner; or if features is not a valid CCS features features is not a valid CCS features for the tuner feature space configuration is NULL
|
extern |
Give a list of results to a tuner through evaluations.
| [in,out] | tuner | |
| [in] | num_evaluations | the size of the evaluations array |
| [in] | evaluations | an array of num_evaluations to provide to the tuner |
tuner is not a valid CCS tuner; or if one of the evaluations is not a valid CCS features evaluation evaluations is NULL and num_evaluations is greater than 0
|
extern |
Get the user defined tuner internal data pointer.
| [in] | tuner | |
| [out] | tuner_data_ret |
tuner is not a valid CCS tuner tuner is not a user defined tuner tuner_data_ret is NULL