Increase the maximum hash size by a factor of 256
authorSami Kiminki <skiminki@users.noreply.github.com>
Fri, 5 Jun 2020 17:17:00 +0000 (20:17 +0300)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Tue, 9 Jun 2020 16:44:07 +0000 (18:44 +0200)
commit4b10578acbe099482ed40200478df4d775c01af5
tree8741e47d352b44956a45e5dc5d468e2c7d829088
parentb081e52239e6496070a376452ca04dcc6d1993c5
Increase the maximum hash size by a factor of 256

Conceptually group hash clusters into super clusters of 256 clusters.
This scheme allows us to use hash sizes up to 32 TB
(= 2^32 super clusters = 2^40 clusters).

Use 48 bits of the Zobrist key to choose the cluster index. We use 8
extra bits to mitigate the quantization error for very large hashes when
scaling the hash key to cluster index.

The hash index computation is organized to be compatible with the existing
scheme for power-of-two hash sizes up to 128 GB.

Fixes https://github.com/official-stockfish/Stockfish/issues/1349

closes https://github.com/official-stockfish/Stockfish/pull/2722

Passed non-regression STC:
LLR: 2.93 (-2.94,2.94) {-1.50,0.50}
Total: 37976 W: 7336 L: 7211 D: 23429
Ptnml(0-2): 578, 4295, 9149, 4356, 610
https://tests.stockfishchess.org/tests/view/5edcbaaef29b40b0fc95abc5

No functional change.
src/tt.cpp
src/tt.h
src/ucioption.cpp