]> git.sesse.net Git - stockfish/commit
Refactor tbprobe.cpp
authorOndrej Mosnáček <omosnacek@gmail.com>
Sat, 10 Mar 2018 13:37:42 +0000 (14:37 +0100)
committerStéphane Nicolet <cassio@free.fr>
Tue, 27 Mar 2018 15:08:08 +0000 (17:08 +0200)
commit8ff2fcf299ac621779dc167ce750ba73aaae90a4
treed0feb711931ae810027a53a683d4d4998abe34f2
parent280022baf78a52e9a5c34ef2aec6927aace3e83f
Refactor tbprobe.cpp

This involves:
 * replacing the union hacks with simply reusing the EntryPiece arrays
   for the no-pawns case
 * merging the PairsData structure with the EntryPiece/-Pawn structs
   (with credit to Marco: @mcostalba)
 * simplifying some HashTable functions
 * thanks to previous changes, removing the ugly memsets
 * simplifying the template logic for WDL/DTZ distinction
   (now we distinguish based on an enum type, not the entry classes)
 * removing the unneeded Atomic wrapper

-----------------------------

For reference, here is a manual way to check that patches concerning
table bases code are non-functional changes:

0) Download the Syzygy table bases (up to 6 men).
1) Make sure you have branches master and the pull request pointing to
   the right commits.
2) Download the bench calculation scripts from the following URL:

        https://gist.github.com/WOnder93/b5fcf9c989b4a1715684d5c82367cdbe

   and copy into src inside your Stockfish repo.
3) Make the scripts executable (chmod +x *.sh).
4) Run the following command to use TBs located at <path>:

       export SYZYGY_PATH='<path>'

5) After that, run this (it will take a long time, this is a deep bench):

       BENCH_ARGS='128 1 22' ./check_benches.sh master tbprobe_cleanup 2>/dev/null`

==> You should see two equal numbers printed.
    (Of course, now we have to trust that the script itself is correct :)

-----------------------------

Closes https://github.com/official-stockfish/Stockfish/pull/1477

No functional change.
src/syzygy/tbprobe.cpp