]> git.sesse.net Git - stockfish/blobdiff - src/benchmark.cpp
Remove "Threat Depth" ucioption
[stockfish] / src / benchmark.cpp
index b90d3fcb151f6172f7ea22a2b81d766778acd050..ca40b24845b02f7ddf74dd9c3103c86b9c31c6f0 100644 (file)
@@ -84,9 +84,9 @@ void benchmark(const string& commandLine) {
   }
   csStr >> threads;
   csVal >> val;
-  if (val < 1 || val > THREAD_MAX)
+  if (val < 1 || val > MAX_THREADS)
   {
-      cerr << "The number of threads must be between 1 and " << THREAD_MAX << endl;
+      cerr << "The number of threads must be between 1 and " << MAX_THREADS << endl;
       Application::exit_with_failure();
   }
   set_option_value("Hash", ttSize);
@@ -104,7 +104,7 @@ void benchmark(const string& commandLine) {
 
   if (limitType == "time")
       secsPerPos = val * 1000;
-  else if (limitType == "depth")
+  else if (limitType == "depth" || limitType == "perft")
       maxDepth = val;
   else
       maxNodes = val;
@@ -153,7 +153,9 @@ void benchmark(const string& commandLine) {
       int dummy[2] = {0, 0};
       Position pos(*it);
       cerr << "\nBench position: " << cnt << '/' << positions.size() << endl << endl;
-      if (!think(pos, true, false, 0, dummy, dummy, 0, maxDepth, maxNodes, secsPerPos, moves))
+      if (limitType == "perft")
+          totalNodes += perft(pos, maxDepth * OnePly);
+      else if (!think(pos, false, false, 0, dummy, dummy, 0, maxDepth, maxNodes, secsPerPos, moves))
           break;
       totalNodes += nodes_searched();
   }