-// read_uci_options() updates internal threads parameters from the corresponding
-// UCI options. It is called before to start a new search.
-
-void ThreadsManager::read_uci_options() {
-
- maxThreadsPerSplitPoint = Options["Max Threads per Split Point"];
- minimumSplitDepth = Options["Min Split Depth"] * ONE_PLY;
- useSleepingThreads = Options["Use Sleeping Threads"];
- activeThreads = Options["Threads"];
-
- // Dynamically allocate Thread object according to the number of
- // active threads. This avoids preallocating memory for all possible
- // threads if only few are used.
- for (int i = 0; i < MAX_THREADS; i++)
- if (i < activeThreads && !threads[i])
- threads[i] = new Thread(i);
- else if (i >= activeThreads && threads[i])
- {
- delete threads[i];
- threads[i] = NULL;
- }