diff --git a/bindings/python/cconfigspace/configuration_space.py b/bindings/python/cconfigspace/configuration_space.py index 244c3296..e96d82b8 100644 --- a/bindings/python/cconfigspace/configuration_space.py +++ b/bindings/python/cconfigspace/configuration_space.py @@ -7,8 +7,7 @@ from .expression_parser import parser from .rng import Rng -ccs_create_configuration_space = _ccs_get_function("ccs_create_configuration_space", [ct.c_char_p, ct.c_size_t, ct.POINTER(ccs_parameter), ct.POINTER(ccs_expression), ct.c_size_t, ct.POINTER(ccs_expression), ct.POINTER(ccs_configuration_space)]) -ccs_configuration_space_set_rng = _ccs_get_function("ccs_configuration_space_set_rng", [ccs_configuration_space, ccs_rng]) +ccs_create_configuration_space = _ccs_get_function("ccs_create_configuration_space", [ct.c_char_p, ct.c_size_t, ct.POINTER(ccs_parameter), ct.POINTER(ccs_expression), ct.c_size_t, ct.POINTER(ccs_expression), ccs_rng, ct.POINTER(ccs_configuration_space)]) ccs_configuration_space_get_rng = _ccs_get_function("ccs_configuration_space_get_rng", [ccs_configuration_space, ct.POINTER(ccs_rng)]) ccs_configuration_space_get_condition = _ccs_get_function("ccs_configuration_space_get_condition", [ccs_configuration_space, ct.c_size_t, ct.POINTER(ccs_expression)]) ccs_configuration_space_get_conditions = _ccs_get_function("ccs_configuration_space_get_conditions", [ccs_configuration_space, ct.c_size_t, ct.POINTER(ccs_expression), ct.POINTER(ct.c_size_t)]) @@ -21,7 +20,7 @@ class ConfigurationSpace(Context): def __init__(self, handle = None, retain = False, auto_release = True, - name = "", parameters = None, conditions = None, forbidden_clauses = None): + name = "", parameters = None, conditions = None, forbidden_clauses = None, rng = None): if handle is None: count = len(parameters) @@ -52,9 +51,12 @@ def __init__(self, handle = None, retain = False, auto_release = True, else: cv = None + if rng is not None: + rng = rng.handle + parameters = (ccs_parameter * count)(*[x.handle.value for x in parameters]) handle = ccs_configuration_space() - res = ccs_create_configuration_space(str.encode(name), count, parameters, cv, numfc, fcv, ct.byref(handle)) + res = ccs_create_configuration_space(str.encode(name), count, parameters, cv, numfc, fcv, rng, ct.byref(handle)) Error.check(res) super().__init__(handle = handle, retain = False) else: @@ -71,11 +73,6 @@ def rng(self): Error.check(res) return Rng.from_handle(v) - @rng.setter - def rng(self, r): - res = ccs_configuration_space_set_rng(self.handle, r.handle) - Error.check(res) - def condition(self, parameter): if isinstance(parameter, Parameter): parameter = self.parameter_index(parameter) diff --git a/bindings/ruby/lib/cconfigspace/configuration_space.rb b/bindings/ruby/lib/cconfigspace/configuration_space.rb index ad785123..a0443b31 100644 --- a/bindings/ruby/lib/cconfigspace/configuration_space.rb +++ b/bindings/ruby/lib/cconfigspace/configuration_space.rb @@ -1,6 +1,5 @@ module CCS - attach_function :ccs_create_configuration_space, [:string, :size_t, :pointer, :pointer, :size_t, :pointer, :pointer], :ccs_result_t - attach_function :ccs_configuration_space_set_rng, [:ccs_configuration_space_t, :ccs_rng_t], :ccs_result_t + attach_function :ccs_create_configuration_space, [:string, :size_t, :pointer, :pointer, :size_t, :pointer, :ccs_rng_t, :pointer], :ccs_result_t attach_function :ccs_configuration_space_get_rng, [:ccs_configuration_space_t, :pointer], :ccs_result_t attach_function :ccs_configuration_space_get_condition, [:ccs_configuration_space_t, :size_t, :pointer], :ccs_result_t attach_function :ccs_configuration_space_get_conditions, [:ccs_configuration_space_t, :size_t, :pointer, :pointer], :ccs_result_t @@ -14,7 +13,7 @@ module CCS class ConfigurationSpace < Context def initialize(handle = nil, retain: false, auto_release: true, - name: "", parameters: nil, conditions: nil, forbidden_clauses: nil) + name: "", parameters: nil, conditions: nil, forbidden_clauses: nil, rng: nil) if handle super(handle, retain: retain, auto_release: auto_release) else @@ -58,7 +57,7 @@ def initialize(handle = nil, retain: false, auto_release: true, cptr = nil end - CCS.error_check CCS.ccs_create_configuration_space(name, count, p_parameters, cptr, fccount, fcptr, ptr) + CCS.error_check CCS.ccs_create_configuration_space(name, count, p_parameters, cptr, fccount, fcptr, rng, ptr) super(ptr.read_ccs_configuration_space_t, retain:false) end end @@ -73,11 +72,6 @@ def rng Rng::from_handle(ptr.read_ccs_rng_t) end - def rng=(r) - CCS.error_check CCS.ccs_configuration_space_set_rng(@handle, r) - r - end - def condition(parameter) case parameter when Parameter diff --git a/connectors/kokkos/ccs-kokkos-connector.cpp b/connectors/kokkos/ccs-kokkos-connector.cpp index f7f1f42c..abd97f6c 100644 --- a/connectors/kokkos/ccs-kokkos-connector.cpp +++ b/connectors/kokkos/ccs-kokkos-connector.cpp @@ -515,7 +515,7 @@ kokkosp_request_values( CCS_CHECK(ccs_create_configuration_space( ("cs (region: " + std::to_string(regionCounter) + ")").c_str(), - numTuningVariables, cs_parameters, NULL, 0, NULL, &cs)); + numTuningVariables, cs_parameters, NULL, 0, NULL, NULL, &cs)); delete[] cs_parameters; #if CCS_DEBUG diff --git a/include/cconfigspace/configuration_space.h b/include/cconfigspace/configuration_space.h index 66cdb750..c9ec08b7 100644 --- a/include/cconfigspace/configuration_space.h +++ b/include/cconfigspace/configuration_space.h @@ -27,6 +27,7 @@ extern "C" { * @param[in] forbidden_clauses an array o \p num_forbidden_clauses expressions * to add as forbidden clauses to the * configuration space + * @param[in] rng an optional CCS rng object * @param[out] configuration_space_ret a pointer to the variable that will hold * the newly created configuration space * @return #CCS_RESULT_SUCCESS on success @@ -35,7 +36,8 @@ extern "C" { * num_parameters is NULL; or if \p forbidden_clauses is NULL and \p * num_forbidden_clauses is greater than 0 * @return #CCS_RESULT_ERROR_INVALID_OBJECT if a parameter is not a valid CCS - * parameter; or if an expression is not a valid CCS expression + * parameter; or if an expression is not a valid CCS expression; or if \p + * rng is not NULL and is not a valid CCS rng * @return #CCS_RESULT_ERROR_INVALID_PARAMETER if a parameter's type is * CCS_PARAMETER_TYPE_STRING; or if a parameter appears more than once in \p * parameters; or if two or more parameters share the same name; or if an @@ -57,23 +59,9 @@ ccs_create_configuration_space( ccs_expression_t *conditions, size_t num_forbidden_clauses, ccs_expression_t *forbidden_clauses, + ccs_rng_t rng, ccs_configuration_space_t *configuration_space_ret); -/** - * Set (replace) the internal rng of the configuration space. - * @param[in,out] configuration_space - * @param[in] rng the rng to use in the configuration space - * @return #CCS_RESULT_SUCCESS on success - * @return #CCS_RESULT_ERROR_INVALID_OBJECT if \p configuration_space is not a - * valid CCS configuration space; or \p rng is not a valid CCS rng - * @remarks - * This function is thread-safe - */ -extern ccs_result_t -ccs_configuration_space_set_rng( - ccs_configuration_space_t configuration_space, - ccs_rng_t rng); - /** * Get the internal rng of the configuration space. * @param[in] configuration_space diff --git a/samples/test_python.c b/samples/test_python.c index e31baf68..febca37b 100644 --- a/samples/test_python.c +++ b/samples/test_python.c @@ -32,7 +32,7 @@ create_problem(ccs_configuration_space_t *cs, ccs_objective_space_t *os) parameters[1] = parameter2 = create_numerical("y", -5.0, 5.0); err = ccs_create_configuration_space( - "2dplane", 2, parameters, NULL, 0, NULL, &cspace); + "2dplane", 2, parameters, NULL, 0, NULL, NULL, &cspace); assert(err == CCS_RESULT_SUCCESS); parameter3 = create_numerical("z", -CCS_INFINITY, CCS_INFINITY); diff --git a/samples/test_ruby.c b/samples/test_ruby.c index bbaa4f80..dec7eb90 100644 --- a/samples/test_ruby.c +++ b/samples/test_ruby.c @@ -41,7 +41,7 @@ create_problem(ccs_configuration_space_t *cs, ccs_objective_space_t *os) parameters[1] = parameter2 = create_numerical("y", -5.0, 5.0); err = ccs_create_configuration_space( - "2dplane", 2, parameters, NULL, 0, NULL, &cspace); + "2dplane", 2, parameters, NULL, 0, NULL, NULL, &cspace); assert(err == CCS_RESULT_SUCCESS); parameter3 = create_numerical("z", -CCS_INFINITY, CCS_INFINITY); diff --git a/src/configuration_space.c b/src/configuration_space.c index a9a69a4e..e7d479e7 100644 --- a/src/configuration_space.c +++ b/src/configuration_space.c @@ -188,30 +188,19 @@ _ccs_configuration_space_serialize_size( size_t *cum_size, _ccs_object_serialize_options_t *opts) { - ccs_result_t err = CCS_RESULT_SUCCESS; - CCS_OBJ_RDLOCK(object); switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: - CCS_VALIDATE_ERR_GOTO( - err, - _ccs_serialize_bin_size_ccs_configuration_space( - (ccs_configuration_space_t)object, cum_size, - opts), - end); + CCS_VALIDATE(_ccs_serialize_bin_size_ccs_configuration_space( + (ccs_configuration_space_t)object, cum_size, opts)); break; default: - CCS_RAISE_ERR_GOTO( - err, CCS_RESULT_ERROR_INVALID_VALUE, end, + CCS_RAISE( + CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE_ERR_GOTO( - err, - _ccs_object_serialize_user_data_size( - object, format, cum_size, opts), - end); -end: - CCS_OBJ_UNLOCK(object); - return err; + CCS_VALIDATE(_ccs_object_serialize_user_data_size( + object, format, cum_size, opts)); + return CCS_RESULT_SUCCESS; } static ccs_result_t @@ -222,30 +211,20 @@ _ccs_configuration_space_serialize( char **buffer, _ccs_object_serialize_options_t *opts) { - ccs_result_t err = CCS_RESULT_SUCCESS; - CCS_OBJ_RDLOCK(object); switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: - CCS_VALIDATE_ERR_GOTO( - err, - _ccs_serialize_bin_ccs_configuration_space( - (ccs_configuration_space_t)object, buffer_size, - buffer, opts), - end); + CCS_VALIDATE(_ccs_serialize_bin_ccs_configuration_space( + (ccs_configuration_space_t)object, buffer_size, buffer, + opts)); break; default: - CCS_RAISE_ERR_GOTO( - err, CCS_RESULT_ERROR_INVALID_VALUE, end, + CCS_RAISE( + CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE_ERR_GOTO( - err, - _ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts), - end); -end: - CCS_OBJ_UNLOCK(object); - return err; + CCS_VALIDATE(_ccs_object_serialize_user_data( + object, format, buffer_size, buffer, opts)); + return CCS_RESULT_SUCCESS; } static _ccs_configuration_space_ops_t _configuration_space_ops = { @@ -522,6 +501,7 @@ ccs_create_configuration_space( ccs_expression_t *conditions, size_t num_forbidden_clauses, ccs_expression_t *forbidden_clauses, + ccs_rng_t rng, ccs_configuration_space_t *configuration_space_ret) { CCS_CHECK_PTR(name); @@ -538,6 +518,8 @@ ccs_create_configuration_space( CCS_CHECK_ARY(num_forbidden_clauses, forbidden_clauses); for (size_t i = 0; i < num_forbidden_clauses; i++) CCS_CHECK_OBJ(forbidden_clauses[i], CCS_OBJECT_TYPE_EXPRESSION); + if (rng) + CCS_CHECK_OBJ(rng, CCS_OBJECT_TYPE_RNG); ccs_result_t err; uintptr_t mem = (uintptr_t)calloc( @@ -553,8 +535,10 @@ ccs_create_configuration_space( strlen(name) + 1); CCS_REFUTE(!mem, CCS_RESULT_ERROR_OUT_OF_MEMORY); uintptr_t mem_orig = mem; - ccs_rng_t rng; - CCS_VALIDATE_ERR_GOTO(err, ccs_create_rng(&rng), errmem); + if (rng) + CCS_VALIDATE_ERR_GOTO(err, ccs_retain_object(rng), errmem); + else + CCS_VALIDATE_ERR_GOTO(err, ccs_create_rng(&rng), errmem); ccs_configuration_space_t config_space; config_space = (ccs_configuration_space_t)mem; @@ -621,22 +605,6 @@ ccs_create_configuration_space( #undef utarray_oom #define utarray_oom() exit(-1) -ccs_result_t -ccs_configuration_space_set_rng( - ccs_configuration_space_t configuration_space, - ccs_rng_t rng) -{ - CCS_CHECK_OBJ(configuration_space, CCS_OBJECT_TYPE_CONFIGURATION_SPACE); - CCS_CHECK_OBJ(rng, CCS_OBJECT_TYPE_RNG); - CCS_VALIDATE(ccs_retain_object(rng)); - CCS_OBJ_WRLOCK(configuration_space); - ccs_rng_t tmp = configuration_space->data->rng; - configuration_space->data->rng = rng; - CCS_OBJ_UNLOCK(configuration_space); - CCS_VALIDATE(ccs_release_object(tmp)); - return CCS_RESULT_SUCCESS; -} - ccs_result_t ccs_configuration_space_get_rng( ccs_configuration_space_t configuration_space, @@ -644,9 +612,7 @@ ccs_configuration_space_get_rng( { CCS_CHECK_OBJ(configuration_space, CCS_OBJECT_TYPE_CONFIGURATION_SPACE); CCS_CHECK_PTR(rng_ret); - CCS_OBJ_RDLOCK(configuration_space); *rng_ret = configuration_space->data->rng; - CCS_OBJ_UNLOCK(configuration_space); return CCS_RESULT_SUCCESS; } @@ -838,7 +804,7 @@ static inline ccs_result_t _ccs_configuration_space_samples( ccs_configuration_space_t configuration_space, ccs_distribution_space_t distrib_space, - ccs_rng_t r, + ccs_rng_t rng, size_t num_configurations, ccs_configuration_t *configurations) { @@ -848,7 +814,6 @@ _ccs_configuration_space_samples( ccs_bool_t found; ccs_configuration_t config = NULL; ccs_distribution_space_t distribution_space; - ccs_rng_t rng; if (distrib_space) { distribution_space = distrib_space; @@ -857,11 +822,8 @@ _ccs_configuration_space_samples( distribution_space = configuration_space->data->default_distribution_space; - if (!r) { - CCS_OBJ_RDLOCK(configuration_space); + if (!rng) rng = configuration_space->data->rng; - } else - rng = r; for (size_t i = 0; i < num_configurations; i++) configurations[i] = NULL; @@ -895,8 +857,6 @@ _ccs_configuration_space_samples( end: if (distrib_space) CCS_OBJ_UNLOCK(distrib_space); - if (!r) - CCS_OBJ_UNLOCK(configuration_space); return err; } diff --git a/src/configuration_space_deserialize.h b/src/configuration_space_deserialize.h index 30795596..3beebabd 100644 --- a/src/configuration_space_deserialize.h +++ b/src/configuration_space_deserialize.h @@ -113,12 +113,8 @@ _ccs_deserialize_bin_configuration_space( ccs_create_configuration_space( data.name, data.num_parameters, data.parameters, data.conditions, data.num_forbidden_clauses, - data.forbidden_clauses, configuration_space_ret), - end); - CCS_VALIDATE_ERR_GOTO( - res, - ccs_configuration_space_set_rng( - *configuration_space_ret, data.rng), + data.forbidden_clauses, data.rng, + configuration_space_ret), end); if (opts && opts->map_values && opts->handle_map) CCS_VALIDATE_ERR_GOTO( diff --git a/tests/test_condition.c b/tests/test_condition.c index b07d273c..abf1c65c 100644 --- a/tests/test_condition.c +++ b/tests/test_condition.c @@ -36,7 +36,7 @@ test_simple(void) assert(err == CCS_RESULT_SUCCESS); err = ccs_create_configuration_space( - "space", 2, parameters, conditions, 0, NULL, &space); + "space", 2, parameters, conditions, 0, NULL, NULL, &space); assert(err == CCS_RESULT_SUCCESS); for (int i = 0; i < 100; i++) { @@ -123,7 +123,7 @@ test_transitive(void) assert(err == CCS_RESULT_SUCCESS); err = ccs_create_configuration_space( - "space", 3, parameters, conditions, 0, NULL, &space); + "space", 3, parameters, conditions, 0, NULL, NULL, &space); assert(err == CCS_RESULT_SUCCESS); err = ccs_release_object(conditions[0]); diff --git a/tests/test_configuration_space.c b/tests/test_configuration_space.c index 89ac7c5a..4800a3eb 100644 --- a/tests/test_configuration_space.c +++ b/tests/test_configuration_space.c @@ -101,7 +101,7 @@ test_empty(void) ccs_result_t err; err = ccs_create_configuration_space( - "my_config_space", 0, NULL, NULL, 0, NULL, + "my_config_space", 0, NULL, NULL, 0, NULL, NULL, &configuration_space); assert(err == CCS_RESULT_SUCCESS); @@ -138,19 +138,19 @@ test_create(void) parameters[2] = parameters[0]; err = ccs_create_configuration_space( - "my_config_space", 3, NULL, NULL, 0, NULL, + "my_config_space", 3, NULL, NULL, 0, NULL, NULL, &configuration_space); assert(err == CCS_RESULT_ERROR_INVALID_VALUE); err = ccs_create_configuration_space( - "my_config_space", 3, parameters, NULL, 0, NULL, + "my_config_space", 3, parameters, NULL, 0, NULL, NULL, &configuration_space); assert(err == CCS_RESULT_ERROR_INVALID_PARAMETER); parameters[2] = parameter3; err = ccs_create_configuration_space( - "my_config_space", 3, parameters, NULL, 0, NULL, + "my_config_space", 3, parameters, NULL, 0, NULL, NULL, &configuration_space); assert(err == CCS_RESULT_SUCCESS); @@ -191,7 +191,7 @@ test_sample(void) assert(err == CCS_RESULT_SUCCESS); err = ccs_create_configuration_space( - "my_config_space", 4, parameters, NULL, 0, NULL, + "my_config_space", 4, parameters, NULL, 0, NULL, NULL, &configuration_space); assert(err == CCS_RESULT_SUCCESS); @@ -255,7 +255,7 @@ test_configuration_deserialize(void) parameters[2] = create_numerical("param3"); err = ccs_create_configuration_space( - "my_config_space", 3, parameters, NULL, 0, NULL, + "my_config_space", 3, parameters, NULL, 0, NULL, NULL, &configuration_space); assert(err == CCS_RESULT_SUCCESS); @@ -354,7 +354,7 @@ test_deserialize(void) err = ccs_create_configuration_space( "my_config_space", 3, parameters, conditions, 1, &expression, - &space); + NULL, &space); assert(err == CCS_RESULT_SUCCESS); err = ccs_release_object(expression); assert(err == CCS_RESULT_SUCCESS); diff --git a/tests/test_distribution_space.c b/tests/test_distribution_space.c index 627a5546..7e845acc 100644 --- a/tests/test_distribution_space.c +++ b/tests/test_distribution_space.c @@ -107,7 +107,7 @@ test_create(void) parameters[2] = create_dummy_parameter("param3"); err = ccs_create_configuration_space( - "my_config_space", 3, parameters, NULL, 0, NULL, + "my_config_space", 3, parameters, NULL, 0, NULL, NULL, &configuration_space); assert(err == CCS_RESULT_SUCCESS); @@ -154,7 +154,7 @@ test_set_distribution(void) parameters[2] = create_dummy_parameter("param3"); err = ccs_create_configuration_space( - "my_config_space", 3, parameters, NULL, 0, NULL, + "my_config_space", 3, parameters, NULL, 0, NULL, NULL, &configuration_space); assert(err == CCS_RESULT_SUCCESS); @@ -303,7 +303,7 @@ test_deserialize(void) parameters[2] = create_numerical("param3"); err = ccs_create_configuration_space( - "my_config_space", 3, parameters, NULL, 0, NULL, &space); + "my_config_space", 3, parameters, NULL, 0, NULL, NULL, &space); assert(err == CCS_RESULT_SUCCESS); err = ccs_create_distribution_space(space, &distrib_space); diff --git a/tests/test_expression.c b/tests/test_expression.c index 9e0d37e1..2ec50c35 100644 --- a/tests/test_expression.c +++ b/tests/test_expression.c @@ -173,7 +173,7 @@ test_equal_numerical(void) parameters[1] = create_dummy_numerical("param2"); err = ccs_create_configuration_space( - "my_config_space", 2, parameters, NULL, 0, NULL, + "my_config_space", 2, parameters, NULL, 0, NULL, NULL, &configuration_space); assert(err == CCS_RESULT_SUCCESS); @@ -264,7 +264,7 @@ test_equal_categorical(void) parameters[0] = create_dummy_categorical("param1"); parameters[1] = create_dummy_categorical("param2"); err = ccs_create_configuration_space( - "my_config_space", 2, parameters, NULL, 0, NULL, + "my_config_space", 2, parameters, NULL, 0, NULL, NULL, &configuration_space); assert(err == CCS_RESULT_SUCCESS); @@ -323,7 +323,7 @@ test_equal_ordinal(void) parameters[0] = create_dummy_ordinal("param1"); parameters[1] = create_dummy_ordinal("param2"); err = ccs_create_configuration_space( - "my_config_space", 2, parameters, NULL, 0, NULL, + "my_config_space", 2, parameters, NULL, 0, NULL, NULL, &configuration_space); assert(err == CCS_RESULT_SUCCESS); @@ -980,7 +980,7 @@ test_check_context(void) parameters[1] = parameter2; err = ccs_create_configuration_space( - "space", 2, parameters, NULL, 0, NULL, &space); + "space", 2, parameters, NULL, 0, NULL, NULL, &space); assert(err == CCS_RESULT_SUCCESS); err = ccs_create_binary_expression( diff --git a/tests/test_forbidden.c b/tests/test_forbidden.c index 19566257..c2efb3bc 100644 --- a/tests/test_forbidden.c +++ b/tests/test_forbidden.c @@ -35,7 +35,7 @@ test_simple(void) ccs_float(0.0), &expression); assert(err == CCS_RESULT_SUCCESS); err = ccs_create_configuration_space( - "space", 2, parameters, NULL, 1, &expression, &space); + "space", 2, parameters, NULL, 1, &expression, NULL, &space); assert(err == CCS_RESULT_SUCCESS); for (int i = 0; i < 100; i++) { @@ -126,7 +126,8 @@ test_combined(void) assert(err == CCS_RESULT_SUCCESS); err = ccs_create_configuration_space( - "space", 3, parameters, conditions, 1, &expression, &space); + "space", 3, parameters, conditions, 1, &expression, NULL, + &space); assert(err == CCS_RESULT_SUCCESS); err = ccs_release_object(expression); assert(err == CCS_RESULT_SUCCESS); diff --git a/tests/test_random_features_tuner.c b/tests/test_random_features_tuner.c index 8c0758de..fab216a9 100644 --- a/tests/test_random_features_tuner.c +++ b/tests/test_random_features_tuner.c @@ -40,7 +40,7 @@ test(void) parameters[1] = parameter2 = create_numerical("y", -5.0, 5.0); err = ccs_create_configuration_space( - "2dplane", 2, parameters, NULL, 0, NULL, &cspace); + "2dplane", 2, parameters, NULL, 0, NULL, NULL, &cspace); assert(err == CCS_RESULT_SUCCESS); parameter3 = create_numerical("z", -CCS_INFINITY, CCS_INFINITY); @@ -266,7 +266,7 @@ test_evaluation_deserialize(void) parameters[1] = parameter2 = create_numerical("y", -5.0, 5.0); err = ccs_create_configuration_space( - "2dplane", 2, parameters, NULL, 0, NULL, &cspace); + "2dplane", 2, parameters, NULL, 0, NULL, NULL, &cspace); assert(err == CCS_RESULT_SUCCESS); err = ccs_configuration_space_sample( cspace, NULL, NULL, &configuration); diff --git a/tests/test_random_tuner.c b/tests/test_random_tuner.c index 63168fa7..48920b0b 100644 --- a/tests/test_random_tuner.c +++ b/tests/test_random_tuner.c @@ -36,7 +36,7 @@ test(void) parameters[1] = parameter2 = create_numerical("y", -5.0, 5.0); err = ccs_create_configuration_space( - "2dplane", 2, parameters, NULL, 0, NULL, &cspace); + "2dplane", 2, parameters, NULL, 0, NULL, NULL, &cspace); assert(err == CCS_RESULT_SUCCESS); parameter3 = create_numerical("z", -CCS_INFINITY, CCS_INFINITY); @@ -180,7 +180,7 @@ test_evaluation_deserialize(void) parameters[1] = parameter2 = create_numerical("y", -5.0, 5.0); err = ccs_create_configuration_space( - "2dplane", 2, parameters, NULL, 0, NULL, &cspace); + "2dplane", 2, parameters, NULL, 0, NULL, NULL, &cspace); assert(err == CCS_RESULT_SUCCESS); err = ccs_configuration_space_sample( cspace, NULL, NULL, &configuration); diff --git a/tests/test_user_defined_features_tuner.c b/tests/test_user_defined_features_tuner.c index ffaaf4b9..451b7ea7 100644 --- a/tests/test_user_defined_features_tuner.c +++ b/tests/test_user_defined_features_tuner.c @@ -184,7 +184,7 @@ test(void) parameters[1] = parameter2 = create_numerical("y", -5.0, 5.0); err = ccs_create_configuration_space( - "2dplane", 2, parameters, NULL, 0, NULL, &cspace); + "2dplane", 2, parameters, NULL, 0, NULL, NULL, &cspace); assert(err == CCS_RESULT_SUCCESS); parameter3 = create_numerical("z", -CCS_INFINITY, CCS_INFINITY); diff --git a/tests/test_user_defined_tuner.c b/tests/test_user_defined_tuner.c index adbd2d0e..8a4404ef 100644 --- a/tests/test_user_defined_tuner.c +++ b/tests/test_user_defined_tuner.c @@ -166,7 +166,7 @@ test(void) parameters[1] = parameter2 = create_numerical("y", -5.0, 5.0); err = ccs_create_configuration_space( - "2dplane", 2, parameters, NULL, 0, NULL, &cspace); + "2dplane", 2, parameters, NULL, 0, NULL, NULL, &cspace); assert(err == CCS_RESULT_SUCCESS); parameter3 = create_numerical("z", -CCS_INFINITY, CCS_INFINITY);