From: Marco Costalba Date: Thu, 30 Oct 2014 11:11:20 +0000 (+0100) Subject: Assume UCI 'nodes' is int64_t instead of int X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=bcbab1937670ca39ddb0a216ff9a787e56b79b3a;hp=d29a68f5854d0b529f2e0447fddcc6a61200c5aa 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 --- diff --git a/src/search.cpp b/src/search.cpp index 8099787e..fedad432 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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. diff --git a/src/search.h b/src/search.h index 4fe5a5b4..2fd160b6 100644 --- a/src/search.h +++ b/src/search.h @@ -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 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; };