mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Restore NPS output for Perft
Previously it was possible to also get the node counter after running a bench with perft, i.e. `./stockfish bench 1 1 5 current perft`, caused by a small regression from the uci refactoring. ``` Nodes searched: 4865609 =========================== Total time (ms) : 18 Nodes searched : 4865609 Nodes/second : 270311611 ```` closes https://github.com/official-stockfish/Stockfish/pull/5188 No functional change
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <iosfwd>
|
||||
#include <cassert>
|
||||
|
||||
#include "evaluate.h"
|
||||
#include "misc.h"
|
||||
@@ -54,14 +55,15 @@ Engine::Engine(std::string path) :
|
||||
pos.set(StartFEN, false, &states->back());
|
||||
}
|
||||
|
||||
void Engine::go(const Search::LimitsType& limits) {
|
||||
std::uint64_t Engine::perft(const std::string& fen, Depth depth, bool isChess960) {
|
||||
verify_networks();
|
||||
|
||||
if (limits.perft)
|
||||
{
|
||||
perft(pos.fen(), limits.perft, options["UCI_Chess960"]);
|
||||
return;
|
||||
}
|
||||
return Benchmark::perft(fen, depth, isChess960);
|
||||
}
|
||||
|
||||
void Engine::go(const Search::LimitsType& limits) {
|
||||
assert(limits.perft == 0);
|
||||
verify_networks();
|
||||
|
||||
threads.start_thinking(options, pos, states, limits);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user