X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.cpp;h=8be7b7214bf44661265bf0899a23860415a464cd;hp=5c013c6a0b72e06830d2a7389706f45d73b9a43a;hb=8d47caa16ec9d2efad44f2638ce7d7637216d281;hpb=b9d4e6f7fd238edffd91ebbf4b944cddcd65a955 diff --git a/src/thread.cpp b/src/thread.cpp index 5c013c6a..8be7b721 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -155,7 +155,6 @@ void Thread::split(Position& pos, Stack* ss, Value alpha, Value beta, Value* bes sp.masterThread = this; sp.parentSplitPoint = activeSplitPoint; sp.slavesMask = 0, sp.slavesMask.set(idx); - sp.slavesCount = 1; sp.depth = depth; sp.bestValue = *bestValue; sp.bestMove = *bestMove; @@ -183,11 +182,10 @@ void Thread::split(Position& pos, Stack* ss, Value alpha, Value beta, Value* bes Thread* slave; - while ( sp.slavesCount < MAX_SLAVES_PER_SPLITPOINT + while ( sp.slavesMask.count() < MAX_SLAVES_PER_SPLITPOINT && (slave = Threads.available_slave(this)) != NULL) { sp.slavesMask.set(slave->idx); - sp.slavesCount++; slave->activeSplitPoint = &sp; slave->searching = true; // Slave leaves idle_loop() slave->notify_one(); // Could be sleeping