aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-05-24 22:20:00 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-05-24 22:20:00 +0200
commit8954b4b7eaafa8e306f2aa6cbb7e32334107e6e1 (patch)
tree6fc56f9ba2588d7c3c2d5f6d99b3343e1aaf8a34 /src
parent8145e034184ed5807c00f05b90101090c6513a29 (diff)
downloadnissy-core-8954b4b7eaafa8e306f2aa6cbb7e32334107e6e1.tar.gz
nissy-core-8954b4b7eaafa8e306f2aa6cbb7e32334107e6e1.zip
Added table generation utility
Diffstat (limited to '')
-rw-r--r--src/cube.h2
-rw-r--r--src/solve_generic.h26
2 files changed, 19 insertions, 9 deletions
diff --git a/src/cube.h b/src/cube.h
index 32547cf..694560a 100644
--- a/src/cube.h
+++ b/src/cube.h
@@ -161,4 +161,4 @@ void multisolve(
161 161
162/* Returns the number of bytes written to data, -1 in case of error. 162/* Returns the number of bytes written to data, -1 in case of error.
163 * TODO: write down how much memory every solver requires. */ 163 * TODO: write down how much memory every solver requires. */
164int64_t gendata(const char *solver, void *data); 164int64_t gendata(const char *solver, const char *options, void *data);
diff --git a/src/solve_generic.h b/src/solve_generic.h
index 925aa33..6cdcc33 100644
--- a/src/solve_generic.h
+++ b/src/solve_generic.h
@@ -76,14 +76,6 @@ multisolve(
76 } 76 }
77} 77}
78 78
79int64_t
80gendata(const char *solver, void *data)
81{
82 DBG_LOG("gendata: not implemented yet\n");
83
84 return -1;
85}
86
87_static void 79_static void
88solve_generic_appendsolution(dfsarg_generic_t *arg) 80solve_generic_appendsolution(dfsarg_generic_t *arg)
89{ 81{
@@ -257,3 +249,21 @@ solve_simple(
257 &estimate_simple 249 &estimate_simple
258 ); 250 );
259} 251}
252
253int64_t
254gendata(const char *solver, const char *options, void *data)
255{
256 int64_t ret;
257 uint8_t maxdepth;
258
259 if (!strcmp(solver, "H48")) {
260 /* TODO: write a generic parser for options */
261 maxdepth = atoi(options);
262 ret = gendata_h48(data, 0, maxdepth);
263 } else {
264 DBG_LOG("gendata: implemented only for H48 solver\n");
265 ret = -1;
266 }
267
268 return ret;
269}

Generated with cgit - Back to sebastiano.tronto.net