From c04a283a7ab97903683f5f7268068aef69f5bddf Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 13 Jun 2024 22:28:49 +0200 Subject: Added benchmark; removed old folder --- src/solve_generic.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/solve_generic.h') diff --git a/src/solve_generic.h b/src/solve_generic.h index c80f3ef..4e7833f 100644 --- a/src/solve_generic.h +++ b/src/solve_generic.h @@ -235,12 +235,18 @@ int64_t gendata(const char *solver, const char *options, void *data) { int64_t ret; - uint8_t maxdepth; + uint8_t maxdepth, h, i, j; if (!strcmp(solver, "H48")) { - /* TODO: write a generic parser for options */ - maxdepth = atoi(options); - ret = gendata_h48(data, 0, maxdepth); + /* + TODO: write a generic parser for options + for now it accepts "h;maxdepth" + */ + for (i = 0; options[i] != ';'; i++) ; + for (j = i; options[j]; j++) ; + h = atoi(options); + maxdepth = atoi(&options[i+1]); + ret = gendata_h48(data, h, maxdepth); } else { DBG_LOG("gendata: implemented only for H48 solver\n"); ret = -1; -- cgit v1.3