#include "position.h"
#include "psqtab.h"
#include "rkiss.h"
+#include "thread.h"
#include "tt.h"
#include "ucioption.h"
bool Position::move_is_legal(const Move m) const {
- MoveStack mlist[MOVES_MAX];
+ MoveStack mlist[MAX_MOVES];
MoveStack *cur, *last = generate<MV_PSEUDO_LEGAL>(*this, mlist);
for (cur = mlist; cur != last; cur++)
}
// 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);
bool Position::is_mate() const {
- MoveStack moves[MOVES_MAX];
+ MoveStack moves[MAX_MOVES];
return is_check() && generate<MV_LEGAL>(*this, moves) == moves;
}