]> git.sesse.net Git - stockfish/commit
Cache pinned and discovery check bitboards
authorMarco Costalba <mcostalba@gmail.com>
Thu, 19 Feb 2009 15:28:35 +0000 (16:28 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 19 Feb 2009 15:28:35 +0000 (16:28 +0100)
commit5f142ec2098531bac1780f67579dedbd12d18dcc
tree46788252ad7f686cea526a2730f62fff6e2ec6a2
parent7f4f18f959044ee964f8574e625484594c9974b1
Cache pinned and discovery check bitboards

After have been calculated cache their values
so to avoid another expensive call to hidden_checks()
if pinned_pieces() or discovered_check_candidates() are
called with the same position.

Add also interface to get pinners bitboard, we already have
this value so save it instead of discard.

Now that, after the first call to pinned_pieces() the following
are very cheap we can rewrite and cleanup all the checking handling.

So this patch is a prerequisite for future work.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.cpp
src/position.h