]> git.sesse.net Git - stockfish/commitdiff
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)
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>

No differences found