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