X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.cpp;h=26a668ae88cb3df006e9737d1cad70772cd8b243;hp=82608eab4f1ba1e937dc4dd56b29a73b5b2a6e20;hb=d023be5a216af429f39743f1a077acccaaeb5e81;hpb=c2cd75843eb0b6a29ce291fc3ac041b5a082afbc diff --git a/src/bitboard.cpp b/src/bitboard.cpp index 82608eab..26a668ae 100644 --- a/src/bitboard.cpp +++ b/src/bitboard.cpp @@ -66,7 +66,6 @@ namespace { Square BSFTable[64]; Bitboard RTable[0x19000]; // Storage space for rook attacks Bitboard BTable[0x1480]; // Storage space for bishop attacks - uint8_t BitCount8Bit[256]; typedef unsigned (Fn)(Square, Bitboard); @@ -159,9 +158,6 @@ void Bitboards::init() { for (int i = 0; i < 64; i++) BSFTable[bsf_index(1ULL << i)] = Square(i); - for (Bitboard b = 0; b < 256; b++) - BitCount8Bit[b] = (uint8_t)popcount(b); - for (Square s = SQ_A1; s <= SQ_H8; s++) SquareBB[s] = 1ULL << s; @@ -324,7 +320,7 @@ namespace { // until we find the one that passes the verification test. do { do magics[s] = pick_random(rk, booster); - while (BitCount8Bit[(magics[s] * masks[s]) >> 56] < 6); + while (popcount((magics[s] * masks[s]) >> 56) < 6); memset(attacks[s], 0, size * sizeof(Bitboard));