X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.cpp;h=5a4c8b6b82fd6fe5b3330fbbd1d3160ad9352672;hp=b3dbd00be2f6fe5583a2e16ad7c4e2771b504609;hb=7caa6cd3383cf90189a1947c9bdf9c6fea1172a6;hpb=68171ecacaeb0617e3b10c2aaa72d30e5731bf9e diff --git a/src/bitboard.cpp b/src/bitboard.cpp index b3dbd00b..5a4c8b6b 100644 --- a/src/bitboard.cpp +++ b/src/bitboard.cpp @@ -24,8 +24,6 @@ #include "bitcount.h" #include "rkiss.h" -CACHE_LINE_ALIGNMENT - Bitboard RMasks[SQUARE_NB]; Bitboard RMagics[SQUARE_NB]; Bitboard* RAttacks[SQUARE_NB]; @@ -58,8 +56,6 @@ namespace { const uint64_t DeBruijn_64 = 0x3F79D71B4CB0A89ULL; const uint32_t DeBruijn_32 = 0x783A9B23; - CACHE_LINE_ALIGNMENT - int MS1BTable[256]; Square BSFTable[SQUARE_NB]; Bitboard RTable[0x19000]; // Storage space for rook attacks @@ -181,7 +177,7 @@ void Bitboards::init() { for (Square s2 = SQ_A1; s2 <= SQ_H8; ++s2) if (s1 != s2) { - SquareDistance[s1][s2] = std::max(file_distance(s1, s2), rank_distance(s1, s2)); + SquareDistance[s1][s2] = std::max(distance(s1, s2), distance(s1, s2)); DistanceRingsBB[s1][SquareDistance[s1][s2] - 1] |= s2; } @@ -195,7 +191,7 @@ void Bitboards::init() { { Square to = s + Square(c == WHITE ? steps[pt][i] : -steps[pt][i]); - if (is_ok(to) && square_distance(s, to) < 3) + if (is_ok(to) && distance(s, to) < 3) StepAttacksBB[make_piece(c, pt)][s] |= to; } @@ -233,7 +229,7 @@ namespace { for (int i = 0; i < 4; ++i) for (Square s = sq + deltas[i]; - is_ok(s) && square_distance(s, s - deltas[i]) == 1; + is_ok(s) && distance(s, s - deltas[i]) == 1; s += deltas[i]) { attack |= s;