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 52c21640508c3fc668107778ae027ff4428ebd89
parent 38014615238a51f1c0c1f2f96d37cbfbf765520a
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Tue, 29 Jul 2025 10:55:29 +0200

Cleanup some TODOs

Diffstat:
Msrc/solvers/coord/gendata.h | 4++--
Msrc/solvers/coord/solve.h | 8--------
Msrc/solvers/h48/checkdata.h | 5+----
Msrc/solvers/h48/gendata_cocsep.h | 2+-
Msrc/solvers/h48/gendata_h48.h | 6+++---
Msrc/solvers/solutions.h | 1-
Msrc/solvers/tables_types_macros.h | 2+-
7 files changed, 8 insertions(+), 20 deletions(-)

diff --git a/src/solvers/coord/gendata.h b/src/solvers/coord/gendata.h @@ -57,7 +57,7 @@ gendata_coord(const coord_t coord[static 1], unsigned char *buf) .type = TABLETYPE_SPECIAL, .infosize = INFOSIZE, .fullsize = INFOSIZE + coord_dsize, - .hash = 0, /* TODO */ + .hash = 0, .next = INFOSIZE + coord_dsize, /* Unknown / non-applicable values */ @@ -105,7 +105,7 @@ genptable_coord( .type = TABLETYPE_PRUNING, .infosize = INFOSIZE, .fullsize = INFOSIZE + tablesize, - .hash = 0, /* TODO */ + .hash = 0, .entries = coord->max, .classes = 0, .bits = 4, diff --git a/src/solvers/coord/solve.h b/src/solvers/coord/solve.h @@ -312,14 +312,6 @@ solve_coord( .solution_settings = &solution_settings, .solution_list = &solution_list, .nissflag = nissflag, - - /* - Since no move has been done yet, this field should be - neither true nor false; using its value now is logically - undefined behavior. - TODO: find a more elegant solution - */ - .lastisnormal = true, }; if (coord->coord(c, coord_data) == 0) { diff --git a/src/solvers/h48/checkdata.h b/src/solvers/h48/checkdata.h @@ -1,10 +1,7 @@ STATIC long long checkdata_h48( const char *, unsigned long long, const unsigned char *); -/* -Currently unused. -TODO: re-introduce check on cocsep table -*/ +/* TODO: Currently unused, re-introduce check on cocsep table */ uint64_t expected_cocsep[21] = { [0] = 1, [1] = 6, diff --git a/src/solvers/h48/gendata_cocsep.h b/src/solvers/h48/gendata_cocsep.h @@ -35,7 +35,7 @@ gendata_cocsep( .type = TABLETYPE_SPECIAL, .infosize = INFOSIZE, .fullsize = COCSEP_FULLSIZE, - .hash = 0, /* TODO */ + .hash = 0, .entries = COCSEP_TABLESIZE, .classes = COCSEP_CLASSES, .bits = 32, diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h @@ -117,7 +117,7 @@ gendata_h48(gendata_h48_arg_t arg[static 1]) arg->cocsepdata = (uint32_t *)cocsepdata_offset; arg->h48buf = (_Atomic unsigned char*)arg->buf + cocsepsize; - arg->base = 99; /* TODO: set this somewhere else */ + arg->base = 99; if (arg->h == 0 && arg->k == 4) { gendata_h48h0k4(arg); @@ -220,7 +220,7 @@ gendata_h48h0k4(gendata_h48_arg_t arg[static 1]) .type = TABLETYPE_PRUNING, .infosize = INFOSIZE, .fullsize = H48_TABLESIZE(0, 4) + INFOSIZE, - .hash = 0, /* TODO */ + .hash = 0, .entries = H48_COORDMAX(0), .classes = 0, .h48h = 0, @@ -676,7 +676,7 @@ makeinfo_h48k2(gendata_h48_arg_t arg[static 1]) .type = TABLETYPE_PRUNING, .infosize = INFOSIZE, .fullsize = H48_TABLESIZE(arg->h, 2) + INFOSIZE, - .hash = 0, /* TODO */ + .hash = 0, .entries = H48_COORDMAX(arg->h), .classes = 0, .h48h = arg->h, diff --git a/src/solvers/solutions.h b/src/solvers/solutions.h @@ -186,7 +186,6 @@ appendsolution( later, because the allowedmoves check would fail with improperly sorted parallel moves, but then transforming could swap the pairs the wrong way around. - TODO: maybe fix this */ sortparallel_moves(tsol[r].nmoves, tsol[r].moves); diff --git a/src/solvers/tables_types_macros.h b/src/solvers/tables_types_macros.h @@ -26,7 +26,7 @@ typedef struct { uint64_t type; uint64_t infosize; uint64_t fullsize; - uint64_t hash; + uint64_t hash; /* Currently unused */ uint64_t entries; uint64_t classes; /* Used only by cocsepdata, for now */ uint64_t next;