Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
hweight.c File Reference
#include <linux/bitops.h>

Go to the source code of this file.

Functions

unsigned int hweight32 (unsigned int w)
 
unsigned long hweight64 (__u64 w)
 

Function Documentation

unsigned int hweight32 ( unsigned int  w)

hweightN - returns the hamming weight of a N-bit word : the word to weigh

The Hamming Weight of a number is the total number of bits set in it.

Definition at line 10 of file hweight.c.

unsigned long hweight64 ( __u64  w)

Definition at line 19 of file hweight.c.