Move pawn and material tables under Thread class

This change allows to remove some quite a bit of code
and seems the natural thing to do.

Introduced file thread.cpp to move away from search.cpp a lot
of threads related stuff.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-04-24 09:20:03 +01:00
parent c9d7e99de6
commit fecefbb99c
13 changed files with 585 additions and 618 deletions

View File

@@ -29,6 +29,7 @@
#include "position.h"
#include "psqtab.h"
#include "rkiss.h"
#include "thread.h"
#include "tt.h"
#include "ucioption.h"
@@ -1047,7 +1048,8 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
}
// Prefetch pawn and material hash tables
prefetchTables(st->pawnKey, st->materialKey, threadID);
ThreadsMgr[threadID].pawnTable.prefetch(st->pawnKey);
ThreadsMgr[threadID].materialTable.prefetch(st->materialKey);
// Update incremental scores
st->value += pst_delta(piece, from, to);