mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Handle Windows Processors Groups
Under Windows it is not possible for a process to run on more than one logical processor group. This usually means to be limited to use max 64 cores. To overcome this, some special platform specific API should be called to set group affinity for each thread. Original code from Texel by Peter sterlund. Tested by Jean-Paul Vael on a Xeon E7-8890 v4 with 88 threads and confimed speed up between 44 and 88 threads is about 30%, as expected. No functional change.
This commit is contained in:
@@ -96,6 +96,8 @@ void Thread::start_searching(bool resume) {
|
||||
|
||||
void Thread::idle_loop() {
|
||||
|
||||
WinProcGroup::bindThisThread(idx);
|
||||
|
||||
while (!exit)
|
||||
{
|
||||
std::unique_lock<Mutex> lk(mutex);
|
||||
|
||||
Reference in New Issue
Block a user