assert(threadID >= 0 && threadID < ActiveThreads);
assert(ActiveThreads > 1);
- Position pos = Position(sp->pos);
+ Position pos;
+ pos.fast_copy(sp->pos);
CheckInfo ci(pos);
SearchStack* ss = sp->sstack[threadID];
Value value = -VALUE_INFINITE;
assert(threadID >= 0 && threadID < ActiveThreads);
assert(ActiveThreads > 1);
- Position pos = Position(sp->pos);
+ Position pos;
+ pos.fast_copy(sp->pos);
CheckInfo ci(pos);
SearchStack* ss = sp->sstack[threadID];
Value value = -VALUE_INFINITE;
for (i = 0; i < ActiveThreads; i++)
splitPoint->slaves[i] = 0;
+ // Detach splitPoint Position from the master one
+ splitPoint->pos.detach();
+
// Copy the tail of current search stack to the master thread
memcpy(splitPoint->sstack[master] + ply - 1, sstck + ply - 1, 3 * sizeof(SearchStack));
Threads[master].splitPoint = splitPoint;