src/bitUtils.h
/**
 * Counts bits of given ULL integer.
 *
 * @param  bb Bitboard to count bits on.
 *
 * @returns Amount of bits set to 1 in bb.
 */
Counts bits of given ULL integer.

@param  bb Bitboard to count bits on.

@returns Amount of bits set to 1 in bb.
Counts bits of given ULL integer . @param bb Bitboard to count bits on . @returns Amount of bits set to 1 in bb .
inline int popCount(Bitboard bb) {
#if defined(_MSC_VER)
    return (int)__popcnt64(bb);
#elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
    return (int)_popcnt64(bb);
#endif
}
inline int popCount ( Bitboard bb ) { #if defined ( _MSC_VER ) return ( int ) __popcnt64 ( bb ) ; #elif defined ( __GNUC__ ) && ( defined ( __x86_64__ ) || defined ( __i386__ ) ) return ( int ) _popcnt64 ( bb ) ; #endif }
Counts bits of given ULL integer.
Counts bits of given ULL integer .