encapsulated TT | bench 1857933
This commit is contained in:
1 parent
c08c545335
commit
53f6ae17bc
7 files changed
+43
-49
No files matched your search
+5
-6
@@ -8,7 +8,6 @@
|
||||
#include "movegen.h"
|
||||
#include "search.h"
|
||||
#include "benchmark.h"
|
||||
#include "tt.h"
|
||||
#include "perft.h"
|
||||
#include "utils.h"
|
||||
|
||||
@@ -93,10 +92,10 @@ static void ParseGo(Board &board, std::string &command, SEARCH::SearchContext& c
|
||||
}
|
||||
}
|
||||
|
||||
static void SetOption(std::string &command) {
|
||||
static void SetOption(std::string &command, SEARCH::SearchContext& ctx) {
|
||||
if (command.find("Hash") != std::string::npos) {
|
||||
hashSize = (ReadParam("value", command) * 1000000) / sizeof(TTEntry);
|
||||
TT.Resize(hashSize);
|
||||
U64 hashSize = (ReadParam("value", command) * 1000000) / sizeof(TTEntry);
|
||||
ctx.TT.Resize(hashSize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +134,7 @@ void UCILoop(Board &board) {
|
||||
board.SetByFen(StartingFen);
|
||||
|
||||
// Clearing
|
||||
TT.Clear();
|
||||
ctx.TT.Clear();
|
||||
|
||||
ctx.killerMoves = {};
|
||||
ctx.history.Clear();
|
||||
@@ -171,7 +170,7 @@ void UCILoop(Board &board) {
|
||||
}
|
||||
|
||||
if (input.find("setoption") != std::string::npos) {
|
||||
SetOption(input);
|
||||
SetOption(input, ctx);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user