X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=c0b4866bfe4c2a2359a82349acbf84ac23e481f1;hp=4493d7bcca9771ef05df1295ad0dcdf7b62b2f93;hb=4f7ec4128fd39ed49e7cc4b22a7143d9c2d22750;hpb=1e4472b65124a2a190eb3c595d3b59ef07e57891;ds=sidebyside diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 4493d7bc..c0b4866b 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -283,8 +283,6 @@ namespace { inline Value apply_weight(Value v, int w); Value scale_by_game_phase(Value mv, Value ev, Phase ph, const ScaleFactor sf[]); - int count_1s_8bit(Bitboard b); - int compute_weight(int uciWeight, int internalWeight); int weight_option(const std::string& opt, int weight); void init_safety(); @@ -709,7 +707,7 @@ namespace { Bitboard pawns = p.pawns(us) & this_and_neighboring_files_bb(s); Rank r = square_rank(s); for (int i = 1; i < 4; i++) - shelter += count_1s_8bit(shiftRowsDown(pawns, r+i*sign)) * (128>>i); + shelter += BitCount8Bit[shiftRowsDown(pawns, r+i*sign) & 0xFF] * (128 >> i); // Cache shelter value in pawn info ei.pi->setKingShelter(us, s, shelter); @@ -1166,15 +1164,6 @@ namespace { } - // count_1s_8bit() counts the number of nonzero bits in the 8 least - // significant bits of a Bitboard. This function is used by the king - // shield evaluation. - - int count_1s_8bit(Bitboard b) { - return int(BitCount8Bit[b & 0xFF]); - } - - // compute_weight() computes the value of an evaluation weight, by combining // an UCI-configurable weight with an internal weight.