src/bitmask.cpp
Centipawns_t dot_product(Bitboard bb, const Centipawns_t* weights) {
    Bitboard bit = C64(1);
    int accu = 0;

    for (int sq = 0; sq < 64; ++sq, bit += bit) {
        accu += (bb & bit) ? (weights[sq] & -((bb & bit) == bit)) : (0);
    }

    return accu;
}
/**
 * Computes the dot product of a bitboard with weight vector
 * @param bb bitboard (represents existence of piece on certain square)
 * @param weights weight vector (represents score of piece being on a certain square)
 * @return score of bitboard / weight-vector combination
 */
Computes the dot product of a bitboard with weight vector
@param bb bitboard (represents existence of piece on certain square)
@param weights weight vector (represents score of piece being on a certain square)
@return score of bitboard / weight-vector combination
Computes the dot product of a bitboard with weight vector @param bb bitboard ( represents existence of piece on certain square ) @param weights weight vector ( represents score of piece being on a certain square ) @return score of bitboard / weight - vector combination
Centipawns_t dot_product(Bitboard bb, const Centipawns_t* weights) {
    Bitboard bit = C64(1);
    int accu = 0;
    for (int sq = 0; sq < 64; ++sq, bit += bit) {
        accu += (bb & bit) ? (weights[sq] & -((bb & bit) == bit)) : (0);
    }
    return accu;
}
Centipawns_t dot_product ( Bitboard bb , const Centipawns_t * weights ) { Bitboard bit = C64 ( 1 ) ; int accu = 0 ; for ( int sq = 0 ; sq < 64 ; ++ sq , bit += bit ) { accu += ( bb & bit ) ? ( weights [ sq ] & - ( ( bb & bit ) == bit ) ) : ( 0 ) ; } return accu ; }
Computes the dot product of a bitboard with weight vector
 @param bb bitboard (represents existence of piece on certain square)
 @param weights weight vector (represents score of piece being on a certain square)
 @return score of bitboard / weight-vector combination
Computes the dot product of a bitboard with weight vector @param bb bitboard ( represents existence of piece on certain square ) @param weights weight vector ( represents score of piece being on a certain square ) @return score of bitboard / weight - vector combination