tlx
popcount.hpp File Reference
#include <cstdint>
#include <cstdlib>

Go to the source code of this file.

Namespaces

 tlx
 

Functions

static unsigned popcount_generic8 (uint8_t x)
 popcount (count one bits) - generic SWAR implementation More...
 
static unsigned popcount_generic16 (uint16_t x)
 popcount (count one bits) - generic SWAR implementation More...
 
static unsigned popcount_generic32 (uint32_t x)
 popcount (count one bits) - generic SWAR implementation from https://stackoverflow.com/questions/109023 More...
 
static unsigned popcount_generic64 (uint64_t x)
 popcount (count one bits) - generic SWAR implementation More...
 
template<typename Integral >
unsigned popcount (Integral i)
 popcount (count one bits) More...
 
static size_t popcount (const void *data, size_t size)