1
0
Fork 0

Copy 4 SearchStack items in split()

In search routines we use information from previous ply
and init killers two plies ahead.

So for me it seems correct to copy 4 searchstack items
in split:

ply - 1, ply, ply + 1, ply + 2

Because
a) we do not split at root (ply == 0)
b) ply < PLY_MAX and SearchStack size is PLY_MAX_PLUS_2
there should be no risk of underflows or overflows

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
sf_2.3.1_base
Joona Kiiski 2010-02-05 18:05:48 +02:00 committed by Marco Costalba
parent b0858877ae
commit 69644d3f73
1 changed files with 1 additions and 1 deletions

View File

@ -3026,7 +3026,7 @@ namespace {
for (int i = 0; i < ActiveThreads; i++)
if (i == master || splitPoint->slaves[i])
{
memcpy(splitPoint->sstack[i] + ply - 1, sstck + ply - 1, 3 * sizeof(SearchStack));
memcpy(splitPoint->sstack[i] + ply - 1, sstck + ply - 1, 4 * sizeof(SearchStack));
Threads[i].workIsWaiting = true; // This makes the slave to exit from idle_loop()
}