X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.h;h=294025b5266fb9f76aab1181a4ef3583ee8edf90;hp=2b9161250f5fb8277ba4f2deac1e012646cec331;hb=d549497144ee2a704057e005d2bbe1fbc666ca7e;hpb=cc2b3ece5c5d8d1183f8526fbb0ee4e1ea7a69fe diff --git a/src/bitboard.h b/src/bitboard.h index 2b916125..294025b5 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -23,6 +23,13 @@ #include "types.h" +namespace Bitboards { + +extern void init(); +extern void print(Bitboard b); + +} + CACHE_LINE_ALIGNMENT extern Bitboard RMasks[64]; @@ -214,6 +221,7 @@ inline bool single_bit(Bitboard b) { return !(b & (b - 1)); } + /// first_1() finds the least significant nonzero bit in a nonzero bitboard. /// pop_1st_bit() finds and clears the least significant nonzero bit in a /// nonzero bitboard. @@ -262,17 +270,4 @@ extern Square pop_1st_bit(Bitboard* b); #endif -// relative_rank() returns the relative rank of the closest bit set on the Bitboard. -// Only to be used with bitboards that contain a single file. - -template -inline Rank relative_rank(Bitboard b) { - Square s = Us == WHITE ? first_1(b) - : ~last_1(b); - return rank_of(s); -} - -extern void print_bitboard(Bitboard b); -extern void bitboards_init(); - #endif // !defined(BITBOARD_H_INCLUDED)