-/// Intel PEXT (parallel extraction) software implementation
-Bitboard pext(Bitboard b, Bitboard mask) {
-
- Bitboard res = 0;
-
- for (Bitboard bb = 1; mask; bb += bb)
- {
- if (b & mask & -mask)
- res |= bb;
-
- mask &= mask - 1;
- }
- return res;
-}
-
-
-/// lsb()/msb() finds the least/most significant bit in a non-zero bitboard.
-/// pop_lsb() finds and clears the least significant bit in a non-zero bitboard.
-
-#ifndef USE_BSFQ
-
-Square lsb(Bitboard b) { return BSFTable[bsf_index(b)]; }
-
-Square pop_lsb(Bitboard* b) {
-
- Bitboard bb = *b;
- *b = bb & (bb - 1);
- return BSFTable[bsf_index(bb)];
-}
-
-Square msb(Bitboard b) {
-
- unsigned b32;
- int result = 0;
-
- if (b > 0xFFFFFFFF)
- {
- b >>= 32;
- result = 32;
- }
-
- b32 = unsigned(b);
-
- if (b32 > 0xFFFF)
- {
- b32 >>= 16;
- result += 16;
- }
-
- if (b32 > 0xFF)
- {
- b32 >>= 8;
- result += 8;
- }
-
- return Square(result + MS1BTable[b32]);
-}
-
-#endif // ifndef USE_BSFQ
-
-
-/// Bitboards::pretty() returns an ASCII representation of a bitboard to be
-/// printed to standard output. This is sometimes useful for debugging.
+/// Bitboards::pretty() returns an ASCII representation of a bitboard suitable
+/// to be printed to standard output. Useful for debugging.