]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Retire cpu_count()
[stockfish] / src / thread.cpp
index 1772a41931017c2ed1857288ba6a90955deb4b75..08ac30e11a17c4c8b333cdd73093b3db0cf3e649 100644 (file)
@@ -217,6 +217,13 @@ void ThreadPool::read_uci_options() {
 
   assert(requested > 0);
 
+  // Value 0 has a special meaning: We determine the optimal minimum split depth
+  // automatically. Anyhow the minimumSplitDepth should never be under 4 plies.
+  if (!minimumSplitDepth)
+      minimumSplitDepth = (requested < 8 ? 4 : 7) * ONE_PLY;
+  else
+      minimumSplitDepth = std::max(4 * ONE_PLY, minimumSplitDepth);
+
   while (size() < requested)
       push_back(new_thread<Thread>());