aboutsummaryrefslogtreecommitdiff
path: root/src/nissy.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-08-25 10:27:21 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-08-25 10:27:21 +0200
commitdd44adceed44bec3dc313b77ec6f69123dc59016 (patch)
treebef73833770b191e113f90c4aa3d6b1683b35ba2 /src/nissy.c
parent9c5bdcb09dc56104f7ea34c71a9418c7908ed227 (diff)
downloadnissy-core-dd44adceed44bec3dc313b77ec6f69123dc59016.tar.gz
nissy-core-dd44adceed44bec3dc313b77ec6f69123dc59016.zip
Started work on k=2 tables; further split h48 gendata
Diffstat (limited to 'src/nissy.c')
-rw-r--r--src/nissy.c25
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;

Generated with cgit - Back to sebastiano.tronto.net