removed benchStarted bool
This commit is contained in:
1 parent
eff4f50ee8
commit
bd5f5ac602
3 files changed
+6
-9
No files matched your search
@@ -65,7 +65,6 @@ void RunBenchmark() {
|
||||
Board board;
|
||||
int depth = BENCH_DEPTH;
|
||||
int ply = 0;
|
||||
benchStarted = true;
|
||||
searchStopped = false;
|
||||
positionIndex = 0;
|
||||
|
||||
@@ -86,7 +85,6 @@ void RunBenchmark() {
|
||||
|
||||
std::cout << ctx.nodes << " nodes " << int(ctx.nodes/sw.GetElapsedSec()) << " nps" << std::endl;
|
||||
TT.Clear();
|
||||
benchStarted = false;
|
||||
std::memset(killerMoves, 0, sizeof(killerMoves));
|
||||
history.Clear();
|
||||
positionIndex = 0;
|
||||
|
||||
+6
-5
@@ -12,7 +12,6 @@ namespace SEARCH {
|
||||
|
||||
U64 nodes = 0;
|
||||
U64 nodesToGo = 0;
|
||||
bool benchStarted = false;
|
||||
|
||||
static inline int timeToSearch = 0;
|
||||
static inline bool doingNullMove = false;
|
||||
@@ -143,10 +142,12 @@ static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int
|
||||
template <searchMode mode>
|
||||
static SearchResults Quiescence(Board board, int alpha, int beta, int ply, SearchContext& ctx) {
|
||||
if constexpr (mode != nodesMode) {
|
||||
if (!benchStarted && ctx.nodes % 1024 == 0) {
|
||||
if (sw.GetElapsedMS() >= timeToSearch) {
|
||||
StopSearch();
|
||||
return 0;
|
||||
if constexpr (mode != bench) {
|
||||
if (ctx.nodes % 1024 == 0) {
|
||||
if (sw.GetElapsedMS() >= timeToSearch) {
|
||||
StopSearch();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -19,8 +19,6 @@ constexpr int MAX_DEPTH = 64;
|
||||
constexpr int MAX_PLY = 128;
|
||||
constexpr int MAX_HISTORY = 16384;
|
||||
|
||||
extern bool benchStarted;
|
||||
|
||||
constexpr int inf = 100000;
|
||||
|
||||
inline bool searchStopped = false;
|
||||
|
||||
Reference in new issue
Block a user