1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

Assume UCI 'nodes' is int64_t instead of int

UCI specification is not clear on the size of
integers that are exchanged in the protocol, so
instead of a simple int, assume 'nodes' is a
int64_t because we need a bigger size to store
this value in many real cases, especialy with
very long searches.

No functional change.

Resolves #75
This commit is contained in:
Marco Costalba 2014-10-30 12:11:20 +01:00 committed by Joona Kiiski
parent d29a68f585
commit bcbab19376
2 changed files with 5 additions and 4 deletions

View file

@ -1566,7 +1566,7 @@ void check_time() {
{
Threads.mutex.lock();
int nodes = RootPos.nodes_searched();
int64_t nodes = RootPos.nodes_searched();
// Loop across all split points and sum accumulated SplitPoint nodes plus
// all the currently active positions nodes.

View file

@ -78,13 +78,14 @@ struct RootMove {
struct LimitsType {
LimitsType() { // Using memset on a std::vector is undefined behavior
time[WHITE] = time[BLACK] = inc[WHITE] = inc[BLACK] = movestogo =
depth = nodes = movetime = mate = infinite = ponder = 0;
nodes = time[WHITE] = time[BLACK] = inc[WHITE] = inc[BLACK] = movestogo =
depth = movetime = mate = infinite = ponder = 0;
}
bool use_time_management() const { return !(mate | movetime | depth | nodes | infinite); }
std::vector<Move> searchmoves;
int time[COLOR_NB], inc[COLOR_NB], movestogo, depth, nodes, movetime, mate, infinite, ponder;
int time[COLOR_NB], inc[COLOR_NB], movestogo, depth, movetime, mate, infinite, ponder;
int64_t nodes;
};