Commit e6360375 authored by Brice Videau's avatar Brice Videau
Browse files

Renamed result to evaluation.

parent 94f2e1f5
......@@ -12,6 +12,6 @@ include_ccs_HEADERS = \
ccs/expression.h \
ccs/configuration.h \
ccs/objective_space.h \
ccs/result.h \
ccs/evaluation.h \
ccs/tuner.h
......@@ -14,7 +14,7 @@
#include "ccs/configuration_space.h"
#include "ccs/configuration.h"
#include "ccs/objective_space.h"
#include "ccs/result.h"
#include "ccs/evaluation.h"
#include "ccs/tuner.h"
#endif //_CCONFIGSPACE_H
......@@ -29,7 +29,7 @@ typedef struct _ccs_context_s *ccs_context_t;
typedef struct _ccs_configuration_space_s *ccs_configuration_space_t;
typedef struct _ccs_configuration_s *ccs_configuration_t;
typedef struct _ccs_objective_space_s *ccs_objective_space_t;
typedef struct _ccs_result_s *ccs_result_t;
typedef struct _ccs_evaluation_s *ccs_evaluation_t;
typedef struct _ccs_tuner_s *ccs_tuner_t;
enum ccs_error_e {
......@@ -65,6 +65,7 @@ enum ccs_object_type_e {
CCS_CONFIGURATION_SPACE,
CCS_CONFIGURATION,
CCS_OBJECTIVE_SPACE,
CCS_EVALUATION,
CCS_OBJECT_TYPE_MAX,
CCS_OBJECT_TYPE_FORCE_32BIT = INT_MAX
};
......
#ifndef _CCS_EVALUATION_H
#define _CCS_EVALUATION_H
#ifdef __cplusplus
extern "C" {
#endif
extern ccs_error_t
ccs_create_evaluation(ccs_objective_space_t objective_space,
ccs_configuration_t configuration,
ccs_error_t error,
size_t num_values,
ccs_datum_t *values,
void *user_data,
ccs_evaluation_t *evaluation);
extern ccs_error_t
ccs_evaluation_get_objective_space(ccs_evaluation_t evaluation,
ccs_objective_space_t *objective_space_ret);
extern ccs_error_t
ccs_evaluation_get_configuration(ccs_evaluation_t evaluation,
ccs_configuration_t *configuration_ret);
extern ccs_error_t
ccs_evaluation_get_user_data(ccs_evaluation_t evaluation,
void **user_data_ret);
extern ccs_error_t
ccs_evaluation_get_error(ccs_evaluation_t evaluation,
ccs_error_t *error);
extern ccs_error_t
ccs_evaluation_set_error(ccs_evaluation_t evaluation,
ccs_error_t error);
extern ccs_error_t
ccs_evaluation_get_value(ccs_evaluation_t evaluation,
size_t index,
ccs_datum_t *value_ret);
extern ccs_error_t
ccs_evaluation_set_value(ccs_evaluation_t evaluation,
size_t index,
ccs_datum_t value);
extern ccs_error_t
ccs_evaluation_get_values(ccs_evaluation_t evaluation,
size_t num_values,
ccs_datum_t *values,
size_t *num_values_ret);
extern ccs_error_t
ccs_evaluation_get_value_by_name(ccs_evaluation_t evaluation,
const char *name,
ccs_datum_t *value_ret);
extern ccs_error_t
ccs_evaluation_check(ccs_evaluation_t evaluation);
#ifdef __cplusplus
}
#endif
#endif //_CCS_EVALUATION_H
#ifndef _CCS_RESULT_H
#define _CCS_RESULT_H
#ifdef __cplusplus
extern "C" {
#endif
extern ccs_error_t
ccs_create_result(ccs_objective_space_t objective_space,
ccs_configuration_t configuration,
ccs_error_t error,
size_t num_values,
ccs_datum_t *values,
void *user_data,
ccs_result_t *result);
extern ccs_error_t
ccs_result_get_objective_space(ccs_result_t result,
ccs_objective_space_t *objective_space_ret);
extern ccs_error_t
ccs_result_get_configuration(ccs_result_t result,
ccs_configuration_t *configuration_ret);
extern ccs_error_t
ccs_result_get_user_data(ccs_result_t result,
void **user_data_ret);
extern ccs_error_t
ccs_result_get_error(ccs_result_t result,
ccs_error_t *error);
extern ccs_error_t
ccs_result_set_error(ccs_result_t result,
ccs_error_t error);
extern ccs_error_t
ccs_result_get_value(ccs_result_t result,
size_t index,
ccs_datum_t *value_ret);
extern ccs_error_t
ccs_result_set_value(ccs_result_t result,
size_t index,
ccs_datum_t value);
extern ccs_error_t
ccs_result_get_values(ccs_result_t result,
size_t num_values,
ccs_datum_t *values,
size_t *num_values_ret);
extern ccs_error_t
ccs_result_get_value_by_name(ccs_result_t result,
const char *name,
ccs_datum_t *value_ret);
extern ccs_error_t
ccs_result_check(ccs_result_t result);
#ifdef __cplusplus
}
#endif
#endif //_CCS_RESULT_H
......@@ -12,9 +12,9 @@ ccs_tuner_ask(ccs_tuner_t tuner,
size_t *num_configurations_ret);
extern ccs_error_t
ccs_tuner_tell(ccs_tuner_t tuner,
size_t num_results,
ccs_result_t *results);
ccs_tuner_tell(ccs_tuner_t tuner,
size_t num_evaluations,
ccs_evaluation_t *evaluations);
extern ccs_error_t
ccs_tuner_get_optimal(ccs_tuner_t tuner,
......
......@@ -416,7 +416,7 @@ ccs_objective_space_get_objectives(ccs_objective_space_t objective_space,
}
for (size_t i = size; i < num_objectives; i++) {
expressions[i] = NULL;
types[i] = 0;
types[i] = CCS_MINIMIZE;
}
}
if (num_objectives_ret)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment