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
|
||||
## without releasing the memory
|
||||
## 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) =
|
||||
|
|
|
@ -466,6 +466,8 @@ proc startUCISession* =
|
|||
if session.debug:
|
||||
echo &"info string set TT hash table size to {session.hashTableSize} MiB"
|
||||
of "TTClear":
|
||||
if session.debug:
|
||||
echo "info string clearing TT"
|
||||
transpositionTable[].clear()
|
||||
of "Threads":
|
||||
let numWorkers = cmd.value.parseInt()
|
||||
|
|
Loading…
Reference in New Issue