|
C Configuration Space and Tuning Library (CCS)
|
An objective space is a context (see context.h) defining a set of result parameters of a search space. More...

Go to the source code of this file.
Typedefs | |
| typedef enum ccs_objective_type_e | ccs_objective_type_t |
| A commodity type to represent objective types. | |
Enumerations | |
| enum | ccs_objective_type_e { CCS_OBJECTIVE_TYPE_MINIMIZE , CCS_OBJECTIVE_TYPE_MAXIMIZE , CCS_OBJECTIVE_TYPE_MAX , CCS_OBJECTIVE_TYPE_FORCE_32BIT = INT_MAX } |
| Types of a CCS objective. More... | |
Functions | |
| ccs_result_t | ccs_create_objective_space (const char *name, ccs_search_space_t search_space, size_t num_parameters, ccs_parameter_t *parameters, size_t num_objectives, ccs_expression_t *objectives, ccs_objective_type_t *types, ccs_objective_space_t *objective_space_ret) |
| Create a new objective space. | |
| ccs_result_t | ccs_objective_space_get_search_space (ccs_objective_space_t objective_space, ccs_search_space_t *search_space_ret) |
| Get the search space of an objective space. | |
| ccs_result_t | ccs_objective_space_get_objective (ccs_objective_space_t objective_space, size_t index, ccs_expression_t *expression_ret, ccs_objective_type_t *type_ret) |
| Get the objective of rank index in a objective space. | |
| ccs_result_t | ccs_objective_space_get_objectives (ccs_objective_space_t objective_space, size_t num_objectives, ccs_expression_t *expressions, ccs_objective_type_t *types, size_t *num_objectives_ret) |
| Get the objectives in a objective space. | |
An objective space is a context (see context.h) defining a set of result parameters of a search space.
Objective spaces also define a list of expressions (see expression.h) over those parameters called objectives.
| enum ccs_objective_type_e |
|
extern |
Create a new objective space.
| [in] | name | pointer to a string that will be copied internally |
| [in] | search_space | a CCS search space |
| [in] | num_parameters | the number of provided parameters |
| [in] | parameters | an array of num_parameters parameters to add to the objective space |
| [in] | num_objectives | the number of provided expressions |
| [in] | objectives | an array of num_objectives expressions to add as objectives to the objective space |
| [in] | types | an array of num_objectives types of objectives |
| [out] | objective_space_ret | a pointer to the variable that will hold the newly created objective space |
name is NULL; or if search_space is null; or if objective_space_ret is NULL; or if parameters is NULL; or if num_parameters is NULL; or if objectives is NULL and num_objectives is greater than 0; of if types is NULL and num_objectives is greater than 0 parameters; or if two or more parameters share the same name; or if a parameter is already part of another context; or if an expression references a parameter that is not in parameters or in search_space or in search_space feature space if it exists
|
extern |
Get the objective of rank index in a objective space.
| [in] | objective_space | |
| [in] | index | the index of the objective to retrieve |
| [out] | expression_ret | a pointer to the variable that will contain the returned expression |
| [out] | type_ret | a pointer to the variable that will contain the returned objective type |
objective_space is not a valid CCS objective space expression_ret or type_ret are NULL index is greater than the number of objectives in the objective space
|
extern |
Get the objectives in a objective space.
| [in] | objective_space | |
| [in] | num_objectives | the number of expressions that can be added to expressions. If expressions is not NULL, num_objectives must be greater than 0 |
| [out] | expressions | an array of num_objectives that will contain the returned expressions, or NULL. If the array is too big, extra values are set to NULL |
| [out] | types | an array of num_objectives types that will contain the objective types |
| [out] | num_objectives_ret | a pointer to a variable that will contain the number of expressions that are or would be returned. Can be NULL |
objective_space is not a valid CCS objective space expressions is NULL and num_objectives is greater than 0; if types is NULL and num_objectives is greater than 0; or if expressions is NULL and num_objectives_ret is NULL; or if num_objectives is less than then number of expressions that would be returned
|
extern |
Get the search space of an objective space.
| [in] | objective_space | |
| [out] | search_space_ret | a pointer to the variable that will contain the returned search space |
objective_space is not a valid CCS objective space search_space_ret is NULL