diff options
Diffstat (limited to '')
| -rw-r--r-- | src/nissy.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/nissy.c b/src/nissy.c index 9df775c..fac7a20 100644 --- a/src/nissy.c +++ b/src/nissy.c | |||
| @@ -164,22 +164,23 @@ nissy_gendata( | |||
| 164 | ) | 164 | ) |
| 165 | { | 165 | { |
| 166 | int64_t ret; | 166 | int64_t ret; |
| 167 | uint8_t maxdepth, h, i, j; | 167 | uint8_t i; |
| 168 | gendata_h48_arg_t arg; | ||
| 168 | 169 | ||
| 170 | arg.buf = data; | ||
| 169 | if (!strcmp(solver, "h48")) { | 171 | if (!strcmp(solver, "h48")) { |
| 170 | /* options are in the form "h;maxdepth" */ | 172 | /* options are in the form "h;k;maxdepth" */ |
| 173 | arg.h = atoi(options); | ||
| 171 | for (i = 0; options[i] != ';'; i++) ; | 174 | for (i = 0; options[i] != ';'; i++) ; |
| 172 | for (j = i; options[j]; j++) ; | 175 | arg.k = atoi(&options[i+1]); |
| 173 | h = atoi(options); | 176 | for (i = i+1; options[i] != ';'; i++) ; |
| 174 | if (h != 0) { | 177 | arg.maxdepth = atoi(&options[i+1]); |
| 175 | LOG("Temporarily only h=0 is supported\n"); | 178 | ret = gendata_h48(&arg); |
| 176 | ret = -1; | ||
| 177 | } else { | ||
| 178 | maxdepth = atoi(&options[i+1]); | ||
| 179 | ret = gendata_h48h0k4(data, maxdepth); | ||
| 180 | } | ||
| 181 | } else if (!strcmp(solver, "h48stats")) { | 179 | } else if (!strcmp(solver, "h48stats")) { |
| 182 | ret = gendata_h48h0k4(data, 20); | 180 | arg.h = 0; |
| 181 | arg.k = 4; | ||
| 182 | arg.maxdepth = 20; | ||
| 183 | ret = gendata_h48(&arg); | ||
| 183 | } else { | 184 | } else { |
| 184 | LOG("gendata: implemented only for h48 solver\n"); | 185 | LOG("gendata: implemented only for h48 solver\n"); |
| 185 | ret = -1; | 186 | ret = -1; |
