- const int size = Threads[i]->splitPointsSize; // Local copy
- sp = size ? &Threads[i]->splitPoints[size - 1] : NULL;
+ assert(this != Threads[i]);
+ assert(!(this_sp && this_sp->slavesMask.none()));
+
+ // Compute the recursive split points chain size
+ int level = -1;
+ for (SplitPoint* spp = Threads[i]->activeSplitPoint; spp; spp = spp->parentSplitPoint)
+ level++;
+
+ int score = level * 256 * 256 + sp->slavesCount * 256 - sp->depth * 1;