]> git.sesse.net Git - stockfish/blobdiff - src/uci.cpp
Add perft 'divide' command
[stockfish] / src / uci.cpp
index 9574ff96aada4123128df02a92eb0932af0e58bd..f4d71962fda0d58ab17f1fb4dff9160bfc2b1dff 100644 (file)
@@ -174,12 +174,14 @@ void UCI::loop(int argc, char* argv[]) {
           else
               Search::Limits.ponder = false;
       }
-      else if (token == "perft" && (is >> token)) // Read perft depth
+      else if (token == "perft" || token == "divide")
       {
+          int depth;
           stringstream ss;
 
+          is >> depth;
           ss << Options["Hash"]    << " "
-             << Options["Threads"] << " " << token << " current perft";
+             << Options["Threads"] << " " << depth << " current " << token;
 
           benchmark(pos, ss);
       }