nissy-core

The "engine" of nissy, including the H48 optimal solver.
git clone https://git.tronto.net/nissy-core
Download | Log | Files | Refs | README | LICENSE

commit b02fce00115ac597ba34fda128e43586f8710438
parent 5e741a00a1350477c7d8778cb466c8efa27b152d
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Thu, 17 Jul 2025 08:09:46 +0200

Small optimization for coord gendata

Diffstat:
Msrc/solvers/coord/gendata.h | 15++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/solvers/coord/gendata.h b/src/solvers/coord/gendata.h @@ -100,9 +100,6 @@ genptable_coord( tableinfo_t info; tablesize = DIV_ROUND_UP(coord->max, 2); - - memset(table, 0xFF, tablesize); - info = (tableinfo_t) { .solver = "coordinate solver for ", .type = TABLETYPE_PRUNING, @@ -117,6 +114,7 @@ genptable_coord( .next = 0 }; + memset(table, 0xFF, tablesize); memset(info.distribution, 0, INFO_DISTRIBUTION_LEN * sizeof(uint64_t)); append_coord_name(coord, info.solver); @@ -124,7 +122,7 @@ genptable_coord( i = coord->coord(SOLVED_CUBE, data); set_coord_pval(coord, table, i, 0); info.distribution[0] = 1; - for (d = 1, tot = 1; tot < coord->max && d < 20; d++) { + for (d = 1, tot = 1; tot < coord->max && d < 15; d++) { t = 0; if (switch_to_fromnew(tot, coord->max, nm)) { for (i = 0; i < coord->max; i++) @@ -143,7 +141,14 @@ genptable_coord( PRIu64 " of %" PRIu64 ")\n", coord->name, d, t, tot, coord->max); } - info.maxvalue = d-1; + if (tot == coord->max) { + info.maxvalue = d-1; + } else { + LOG("[%s gendata] Depth >= 15: %" PRIu64 " remaining\n", + coord->name, coord->max - tot); + info.distribution[d] = coord->max - tot; + info.maxvalue = 15; + } return info; }