aboutsummaryrefslogtreecommitdiff
path: root/src/solve_generic.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-06-13 22:28:49 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-06-13 22:28:49 +0200
commitc04a283a7ab97903683f5f7268068aef69f5bddf (patch)
tree9809c4a71c2ad1a5123371c32c34f03b1b703ecf /src/solve_generic.h
parent7812684339d03f6993882358b0045c1bc2d5032c (diff)
downloadnissy-core-c04a283a7ab97903683f5f7268068aef69f5bddf.tar.gz
nissy-core-c04a283a7ab97903683f5f7268068aef69f5bddf.zip
Added benchmark; removed old folder
Diffstat (limited to 'src/solve_generic.h')
-rw-r--r--src/solve_generic.h14
1 files changed, 10 insertions, 4 deletions
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
235gendata(const char *solver, const char *options, void *data) 235gendata(const char *solver, const char *options, void *data)
236{ 236{
237 int64_t ret; 237 int64_t ret;
238 uint8_t maxdepth; 238 uint8_t maxdepth, h, i, j;
239 239
240 if (!strcmp(solver, "H48")) { 240 if (!strcmp(solver, "H48")) {
241 /* TODO: write a generic parser for options */ 241 /*
242 maxdepth = atoi(options); 242 TODO: write a generic parser for options
243 ret = gendata_h48(data, 0, maxdepth); 243 for now it accepts "h;maxdepth"
244 */
245 for (i = 0; options[i] != ';'; i++) ;
246 for (j = i; options[j]; j++) ;
247 h = atoi(options);
248 maxdepth = atoi(&options[i+1]);
249 ret = gendata_h48(data, h, maxdepth);
244 } else { 250 } else {
245 DBG_LOG("gendata: implemented only for H48 solver\n"); 251 DBG_LOG("gendata: implemented only for H48 solver\n");
246 ret = -1; 252 ret = -1;

Generated with cgit - Back to sebastiano.tronto.net