Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Brice Videau
CCS
Commits
83ae78ea
Commit
83ae78ea
authored
Jun 09, 2020
by
Brice Videau
Browse files
Add interface for ask/tell tuner support.
parent
11677e38
Changes
6
Hide whitespace changes
Inline
Side-by-side
include/Makefile.am
View file @
83ae78ea
...
...
@@ -10,5 +10,8 @@ include_ccs_HEADERS = \
ccs/configuration_space.h
\
ccs/hyperparameter.h
\
ccs/expression.h
\
ccs/configuration.h
ccs/configuration.h
\
ccs/objective_space.h
\
ccs/result.h
\
ccs/tuner.h
include/cconfigspace.h
View file @
83ae78ea
...
...
@@ -13,5 +13,8 @@
#include
"ccs/context.h"
#include
"ccs/configuration_space.h"
#include
"ccs/configuration.h"
#include
"ccs/objective_space.h"
#include
"ccs/result.h"
#include
"ccs/tuner.h"
#endif //_CCONFIGSPACE_H
include/ccs/base.h
View file @
83ae78ea
...
...
@@ -28,6 +28,9 @@ typedef struct _ccs_expression_s *ccs_expression_t;
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_tuner_s
*
ccs_tuner_t
;
enum
ccs_error_e
{
CCS_SUCCESS
,
...
...
include/ccs/objective_space.h
0 → 100644
View file @
83ae78ea
#ifndef _CCS_OBJECTIVE_SPACE
#define _CCS_OBJECTIVE_SPACE
#ifdef __cplusplus
extern
"C"
{
#endif
enum
ccs_objective_type_e
{
CCS_MINIMIZE
,
CCS_MAXIMIZE
,
CCS_OBJECTIVE_TYPE_MAX
,
CCS_OBJECTIVE_TYPE_FORCE_32BIT
=
INT_MAX
};
typedef
enum
ccs_objective_type_e
ccs_objective_type_t
;
extern
ccs_error_t
ccs_create_objective_space
(
const
char
*
name
,
void
*
user_data
,
ccs_objective_space_t
*
objective_space_ret
);
extern
ccs_error_t
ccs_objective_space_get_name
(
ccs_objective_space_t
objective_space
,
const
char
**
name_ret
);
extern
ccs_error_t
ccs_objective_space_get_user_data
(
ccs_objective_space_t
objective_space
,
void
**
user_data_ret
);
extern
ccs_error_t
ccs_objective_space_add_variable
(
ccs_objective_space_t
objective_space
,
ccs_hyperparameter_t
result
);
extern
ccs_error_t
ccs_objective_space_add_objective
(
ccs_objective_space_t
objective_space
,
ccs_object_t
objective
,
ccs_objective_type_t
type
);
#ifdef __cplusplus
}
#endif
#endif //_CCS_OBJECTIVE_SPACE
include/ccs/result.h
0 → 100644
View file @
83ae78ea
#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
include/ccs/tuner.h
0 → 100644
View file @
83ae78ea
#ifndef _CCS_TUNER_H
#define _CCS_TUNER_H
#ifdef __cplusplus
extern
"C"
{
#endif
extern
ccs_error_t
ccs_tuner_ask
(
ccs_tuner_t
tuner
,
size_t
num_configurations
,
ccs_configuration_t
*
configurations
,
size_t
*
num_configurations_ret
);
extern
ccs_error_t
ccs_tuner_tell
(
ccs_tuner_t
tuner
,
size_t
num_results
,
ccs_result_t
*
results
);
extern
ccs_error_t
ccs_tuner_get_optimal
(
ccs_tuner_t
tuner
,
ccs_configuration_t
*
configuration_ret
);
#ifdef __cplusplus
}
#endif
#endif //_CCS_TUNER_H
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment