Fix clear() proc for transposition table
This commit is contained in:
parent
30b3de233f
commit
d4dfa6b325
|
@ -85,7 +85,8 @@ func clear*(self: var TTable) {.inline.} =
|
||||||
## Clears the transposition table
|
## Clears the transposition table
|
||||||
## without releasing the memory
|
## without releasing the memory
|
||||||
## associated with it
|
## associated with it
|
||||||
self.data.setLen(0)
|
for i in 0..self.data.high():
|
||||||
|
self.data[i] = TTEntry()
|
||||||
|
|
||||||
|
|
||||||
func resize*(self: var TTable, newSize: uint64) =
|
func resize*(self: var TTable, newSize: uint64) =
|
||||||
|
|
|
@ -466,6 +466,8 @@ proc startUCISession* =
|
||||||
if session.debug:
|
if session.debug:
|
||||||
echo &"info string set TT hash table size to {session.hashTableSize} MiB"
|
echo &"info string set TT hash table size to {session.hashTableSize} MiB"
|
||||||
of "TTClear":
|
of "TTClear":
|
||||||
|
if session.debug:
|
||||||
|
echo "info string clearing TT"
|
||||||
transpositionTable[].clear()
|
transpositionTable[].clear()
|
||||||
of "Threads":
|
of "Threads":
|
||||||
let numWorkers = cmd.value.parseInt()
|
let numWorkers = cmd.value.parseInt()
|
||||||
|
|
Loading…
Reference in New Issue