&& depth >= Threads.minimumSplitDepth
&& ( !thisThread->activeSplitPoint
|| !thisThread->activeSplitPoint->allSlavesSearching
&& depth >= Threads.minimumSplitDepth
&& ( !thisThread->activeSplitPoint
|| !thisThread->activeSplitPoint->allSlavesSearching
- || ( int(Threads.size()) > MAX_SLAVES_PER_SPLITPOINT
- && thisThread->activeSplitPoint->slavesCount == MAX_SLAVES_PER_SPLITPOINT))
+ || ( Threads.size() > MAX_SLAVES_PER_SPLITPOINT
+ && thisThread->activeSplitPoint->slavesMask.count() == MAX_SLAVES_PER_SPLITPOINT))
&& thisThread->splitPointsSize < MAX_SPLITPOINTS_PER_THREAD)
{
assert(bestValue > -VALUE_INFINITE && bestValue < beta);
&& thisThread->splitPointsSize < MAX_SPLITPOINTS_PER_THREAD)
{
assert(bestValue > -VALUE_INFINITE && bestValue < beta);
// Pointer 'this_sp' is not null only if we are called from split(), and not
// at the thread creation. This means we are the split point's master.
// Pointer 'this_sp' is not null only if we are called from split(), and not
// at the thread creation. This means we are the split point's master.
// Wake up the master thread so to allow it to return from the idle
// loop in case we are the last slave of the split point.
// Wake up the master thread so to allow it to return from the idle
// loop in case we are the last slave of the split point.
&& available_to(Threads[i]))
{
assert(this != Threads[i]);
assert(!(this_sp && this_sp->slavesMask.none()));
&& available_to(Threads[i]))
{
assert(this != Threads[i]);
assert(!(this_sp && this_sp->slavesMask.none()));
// Loop across all split points and sum accumulated SplitPoint nodes plus
// all the currently active positions nodes.
for (size_t i = 0; i < Threads.size(); ++i)
// Loop across all split points and sum accumulated SplitPoint nodes plus
// all the currently active positions nodes.
for (size_t i = 0; i < Threads.size(); ++i)