|
C Configuration Space and Tuning Library (CCS)
|
An evaluation is a binding (see binding.h) over an objective space (see objective_space.h) given a specific search configuration. More...

Go to the source code of this file.
Typedefs | |
| typedef enum ccs_comparison_e | ccs_comparison_t |
| A commodity type to represent CCS the result of comparing evaluations. | |
Enumerations | |
| enum | ccs_comparison_e { CCS_COMPARISON_BETTER = -1 , CCS_COMPARISON_EQUIVALENT = 0 , CCS_COMPARISON_WORSE = 1 , CCS_COMPARISON_NOT_COMPARABLE = 2 , CCS_COMPARISON_MAX , CCS_COMPARISON_FORCE_32BIT = INT32_MAX } |
| The different possible return codes when comparing two evaluations. More... | |
Functions | |
| ccs_result_t | ccs_create_evaluation (ccs_objective_space_t objective_space, ccs_search_configuration_t configuration, ccs_evaluation_result_t result, size_t num_values, ccs_datum_t *values, ccs_evaluation_t *evaluation_ret) |
| Create a new instance of an evaluation on a given objective_space for a given configuration. | |
| ccs_result_t | ccs_evaluation_get_objective_space (ccs_evaluation_t evaluation, ccs_objective_space_t *objective_space_ret) |
| Get the objective space associated with an evaluation. | |
| ccs_result_t | ccs_evaluation_get_configuration (ccs_evaluation_t evaluation, ccs_search_configuration_t *configuration_ret) |
| Get the configuration associated with an evaluation. | |
| ccs_result_t | ccs_evaluation_get_features (ccs_evaluation_t evaluation, ccs_features_t *features_ret) |
| Get the features associated with an evaluation. | |
| ccs_result_t | ccs_evaluation_get_result (ccs_evaluation_t evaluation, ccs_evaluation_result_t *result_ret) |
| Get the result code associated with an evaluation. | |
| ccs_result_t | ccs_evaluation_get_objective_value (ccs_evaluation_t evaluation, size_t index, ccs_datum_t *value_ret) |
| Get the value of an objective for a valid evaluation in the context of its objective space. | |
| ccs_result_t | ccs_evaluation_get_objective_values (ccs_evaluation_t evaluation, size_t num_values, ccs_datum_t *values, size_t *num_values_ret) |
| Get the values of the objectives for a valid evaluation in the context of its objective space. | |
| ccs_result_t | ccs_evaluation_compare (ccs_evaluation_t evaluation, ccs_evaluation_t other_evaluation, ccs_comparison_t *result_ret) |
| Compare two successful evaluations objectives. | |
An evaluation is a binding (see binding.h) over an objective space (see objective_space.h) given a specific search configuration.
Successful evaluations over the same objective space are weakly ordered by their objective values. Evaluation that have failed must report a result code different than CCS_RESULT_SUCCESS.
| enum ccs_comparison_e |
The different possible return codes when comparing two evaluations.
|
extern |
Create a new instance of an evaluation on a given objective_space for a given configuration.
| [in] | objective_space | the objective space to associate with the evaluation |
| [in] | configuration | the configuration to associate with the evaluation |
| [in] | result | the result code associated with the evaluation |
| [in] | num_values | the number of provided values to initialize the evaluation |
| [in] | values | an optional array of values to initialize the evaluation |
| [out] | evaluation_ret | a pointer to the variable that will hold the newly created evaluation |
objective_space is not a valid CCS objective space; or if configuration is not a valid CCS search configuration configuration search space is not the same as objective_space search space evaluation_ret is NULL; or if values is NULL and num_values is greater than 0; or if the number of values provided is not equal to the number of parameters in the objective space
|
extern |
Compare two successful evaluations objectives.
| [in] | evaluation | the first evaluation |
| [in] | other_evaluation | the second evaluation |
| [out] | result_ret | a pointer to the variable that will contain the result of the comparison. Will contain CCS_COMPARISON_BETTER, CCS_COMPARISON_EQUIVALENT, CCS_COMPARISON_WORSE, or CCS_COMPARISON_NOT_COMPARABLE if the first evaluation is found to be respectively better, equivalent, worse, or not comparable with the second evaluation. |
evaluation or other_evaluation are not valid CCS evaluations; or if evaluation and other_evaluation do not share the same objective space; or if any of the the evaluation is associated a result code different than CCS_RESULT_SUCCESS; or if both evaluations are not of the same type result_ret is NULL; or if there was an issue evaluating any of the objectives
|
extern |
Get the configuration associated with an evaluation.
| [in] | evaluation | |
| [out] | configuration_ret | a pointer to the variable that will contain the configuration |
evaluation is not a valid CCS evaluation configuration_ret is NULL
|
extern |
Get the features associated with an evaluation.
| [in] | evaluation | |
| [out] | features_ret | a pointer to the variable that will contain the features |
evaluation is not a valid CCS evaluation features_ret is NULL
|
extern |
Get the objective space associated with an evaluation.
| [in] | evaluation | |
| [out] | objective_space_ret | a pointer to the variable that will contain the objective space |
evaluation is not a valid CCS evaluation objective_space_ret is NULL
|
extern |
Get the value of an objective for a valid evaluation in the context of its objective space.
| [in] | evaluation | |
| [in] | index | the index of the objective in the objective space |
| [out] | value_ret | a pointer to the variable that will contain the value of the objective |
evaluation is not a valid CCS evaluation value_ret is NULL; or if there was an issue evaluating the objective index is greater than the number of objective in the objective space
|
extern |
Get the values of the objectives for a valid evaluation in the context of its objective space.
| [in] | evaluation | |
| [in] | num_values | the number of values that values can contain |
| [out] | values | an optional array of values that will contain the returned objective values. If values is bigger than the number of objectives, extra values will be set to CCS_DATA_TYPE_NONE |
| [out] | num_values_ret | an optional pointer to a variable that will contain the number of values that are or would be returned. Can be NULL |
evaluation is not a valid CCS evaluation values is NULL and num_values is greater than 0; or if values is NULL and num_values_ret is NULL; or if there was an issue evaluating any of the objectives
|
extern |
Get the result code associated with an evaluation.
| [in] | evaluation | |
| [out] | result_ret | a pointer to the variable that will contain the returned result code |
evaluation is not a valid CCS evaluation result_ret is NULL