X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.cpp;h=08ac30e11a17c4c8b333cdd73093b3db0cf3e649;hp=1772a41931017c2ed1857288ba6a90955deb4b75;hb=a16ba5bbd1034417f864476e4ba33d35970557db;hpb=408e6ee9b646ed8ce230c75a3cc021a5a4979c72 diff --git a/src/thread.cpp b/src/thread.cpp index 1772a419..08ac30e1 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -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());