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/export.h>
#include <linux/bitops.h>
#include <asm/types.h>

Go to the source code of this file.

Functions

unsigned int __sw_hweight32 (unsigned int w)
 
 EXPORT_SYMBOL (__sw_hweight32)
 
unsigned int __sw_hweight16 (unsigned int w)
 
 EXPORT_SYMBOL (__sw_hweight16)
 
unsigned int __sw_hweight8 (unsigned int w)
 
 EXPORT_SYMBOL (__sw_hweight8)
 
unsigned long __sw_hweight64 (__u64 w)
 
 EXPORT_SYMBOL (__sw_hweight64)
 

Function Documentation

unsigned int __sw_hweight16 ( unsigned int  w)

Definition at line 29 of file hweight.c.

unsigned int __sw_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 12 of file hweight.c.

unsigned long __sw_hweight64 ( __u64  w)

Definition at line 46 of file hweight.c.

unsigned int __sw_hweight8 ( unsigned int  w)

Definition at line 38 of file hweight.c.

EXPORT_SYMBOL ( __sw_hweight32  )
EXPORT_SYMBOL ( __sw_hweight16  )
EXPORT_SYMBOL ( __sw_hweight8  )
EXPORT_SYMBOL ( __sw_hweight64  )