aboutsummaryrefslogtreecommitdiff
path: root/src/solve_h48.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-06-17 17:39:06 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-06-17 17:39:30 +0200
commite986713657bc5f9880e91ed49dd9b0d0227f048d (patch)
tree908d371e60546795c4ca1f9a3b67571b964203c5 /src/solve_h48.h
parent02ce9adf6a9168ec66c322ce9e5a5cb9fe1e60a5 (diff)
downloadnissy-core-e986713657bc5f9880e91ed49dd9b0d0227f048d.tar.gz
nissy-core-e986713657bc5f9880e91ed49dd9b0d0227f048d.zip
Use callback function to log to stderr
Diffstat (limited to 'src/solve_h48.h')
-rw-r--r--src/solve_h48.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/solve_h48.h b/src/solve_h48.h
index 8be67b6..fc3b9c9 100644
--- a/src/solve_h48.h
+++ b/src/solve_h48.h
@@ -146,13 +146,13 @@ gendata_cocsep(void *buf, uint64_t *selfsim, cube_t *rep)
146 .rep = rep 146 .rep = rep
147 }; 147 };
148 for (i = 0, n = 0, cc = 0; i < 10; i++) { 148 for (i = 0, n = 0, cc = 0; i < 10; i++) {
149 DBG_LOG("cocsep: generating depth %" PRIu8 "\n", i); 149 _log("cocsep: generating depth %" PRIu8 "\n", i);
150 memset(visited, 0, COCSEP_VISITEDSIZE); 150 memset(visited, 0, COCSEP_VISITEDSIZE);
151 arg.depth = 0; 151 arg.depth = 0;
152 arg.maxdepth = i; 152 arg.maxdepth = i;
153 cc = gendata_cocsep_dfs(&arg); 153 cc = gendata_cocsep_dfs(&arg);
154 info[i+2] = cc; 154 info[i+2] = cc;
155 DBG_LOG("found %" PRIu32 "\n", cc); 155 _log("found %" PRIu32 "\n", cc);
156 } 156 }
157 157
158 info[0] = (uint32_t)n; 158 info[0] = (uint32_t)n;
@@ -161,12 +161,12 @@ gendata_cocsep(void *buf, uint64_t *selfsim, cube_t *rep)
161 "cocsep: computed %" PRIu16 " symmetry classes, " 161 "cocsep: computed %" PRIu16 " symmetry classes, "
162 "expected %zu\n", n, COCSEP_CLASSES); 162 "expected %zu\n", n, COCSEP_CLASSES);
163 163
164 DBG_LOG("cocsep data computed\n"); 164 _log("cocsep data computed\n");
165 DBG_LOG("Symmetry classes: %" PRIu32 "\n", info[0]); 165 _log("Symmetry classes: %" PRIu32 "\n", info[0]);
166 DBG_LOG("Maximum pruning value: %" PRIu32 "\n", info[1]); 166 _log("Maximum pruning value: %" PRIu32 "\n", info[1]);
167 DBG_LOG("Pruning value distribution:\n"); 167 _log("Pruning value distribution:\n");
168 for (j = 0; j < 10; j++) 168 for (j = 0; j < 10; j++)
169 DBG_LOG("%" PRIu8 ":\t%" PRIu32 "\n", j, info[j+2]); 169 _log("%" PRIu8 ":\t%" PRIu32 "\n", j, info[j+2]);
170 170
171gendata_cocsep_return_size: 171gendata_cocsep_return_size:
172 return COCSEP_FULLSIZE; 172 return COCSEP_FULLSIZE;
@@ -264,21 +264,21 @@ gendata_h48(void *buf, uint8_t h, uint8_t maxdepth)
264 tot < esep_max && arg.depth <= maxdepth; 264 tot < esep_max && arg.depth <= maxdepth;
265 arg.depth++ 265 arg.depth++
266 ) { 266 ) {
267 DBG_LOG("esep: generating depth %" PRIu8 "\n", arg.depth); 267 _log("esep: generating depth %" PRIu8 "\n", arg.depth);
268 cc = gendata_esep_bfs(&arg); 268 cc = gendata_esep_bfs(&arg);
269 tot += cc; 269 tot += cc;
270 info[arg.depth+1] = cc; 270 info[arg.depth+1] = cc;
271 DBG_LOG("found %" PRIu64 "\n", cc); 271 _log("found %" PRIu64 "\n", cc);
272 } 272 }
273 273
274 info[0] = arg.depth-1; 274 info[0] = arg.depth-1;
275 infosize = 4 * (size_t)(info[0] + 2); 275 infosize = 4 * (size_t)(info[0] + 2);
276 276
277 DBG_LOG("h48 pruning table computed\n"); 277 _log("h48 pruning table computed\n");
278 DBG_LOG("Maximum pruning value: %" PRIu32 "\n", info[0]); 278 _log("Maximum pruning value: %" PRIu32 "\n", info[0]);
279 DBG_LOG("Pruning value distribution:\n"); 279 _log("Pruning value distribution:\n");
280 for (j = 0; j <= info[0]; j++) 280 for (j = 0; j <= info[0]; j++)
281 DBG_LOG("%" PRIu8 ":\t%" PRIu32 "\n", j, info[j+1]); 281 _log("%" PRIu8 ":\t%" PRIu32 "\n", j, info[j+1]);
282 282
283gendata_h48_return_size: 283gendata_h48_return_size:
284 return cocsepsize + ESEP_TABLESIZE(h, k) + infosize; 284 return cocsepsize + ESEP_TABLESIZE(h, k) + infosize;

Generated with cgit - Back to sebastiano.tronto.net