src/bitcount.c
/**
 * Use the builtin compiler function __builtin_popcount if available.
 * builtin.h from Portable Snippets is used to ensure portable code,
 * see https://github.com/nemequ/portable-snippets/tree/master/builtin.
 */
Use the builtin compiler function __builtin_popcount if available.
Use the builtin compiler function __builtin_popcount if available .
inline int32 bitcount_popcount(uint8 *data, uint8 *end) {
    int32 count = 0;
    uint8 *p = data;
    while (p < end) {
        count += psnip_builtin_popcount(*p);
        ++p;
    }
    return count;
}
inline int32 bitcount_popcount ( uint8 * data , uint8 * end ) { int32 count = 0 ; uint8 * p = data ; while ( p < end ) { count += psnip_builtin_popcount ( * p ) ; ++ p ; } return count ; }
Use the builtin compiler function __builtin_popcount if available.
Use the builtin compiler function __builtin_popcount if available .