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

Go to the source code of this file.

Macros

#define crush_hashmix(a, b, c)
 
#define crush_hash_seed   1315423911
 

Functions

__u32 crush_hash32 (int type, __u32 a)
 
__u32 crush_hash32_2 (int type, __u32 a, __u32 b)
 
__u32 crush_hash32_3 (int type, __u32 a, __u32 b, __u32 c)
 
__u32 crush_hash32_4 (int type, __u32 a, __u32 b, __u32 c, __u32 d)
 
__u32 crush_hash32_5 (int type, __u32 a, __u32 b, __u32 c, __u32 d, __u32 e)
 
const charcrush_hash_name (int type)
 

Macro Definition Documentation

#define crush_hash_seed   1315423911

Definition at line 22 of file hash.c.

#define crush_hashmix (   a,
  b,
  c 
)
Value:
do { \
a = a-b; a = a-c; a = a^(c>>13); \
b = b-c; b = b-a; b = b^(a<<8); \
c = c-a; c = c-b; c = c^(b>>13); \
a = a-b; a = a-c; a = a^(c>>12); \
b = b-c; b = b-a; b = b^(a<<16); \
c = c-a; c = c-b; c = c^(b>>5); \
a = a-b; a = a-c; a = a^(c>>3); \
b = b-c; b = b-a; b = b^(a<<10); \
c = c-a; c = c-b; c = c^(b>>15); \
} while (0)

Definition at line 10 of file hash.c.

Function Documentation

__u32 crush_hash32 ( int  type,
__u32  a 
)

Definition at line 91 of file hash.c.

__u32 crush_hash32_2 ( int  type,
__u32  a,
__u32  b 
)

Definition at line 101 of file hash.c.

__u32 crush_hash32_3 ( int  type,
__u32  a,
__u32  b,
__u32  c 
)

Definition at line 111 of file hash.c.

__u32 crush_hash32_4 ( int  type,
__u32  a,
__u32  b,
__u32  c,
__u32  d 
)

Definition at line 121 of file hash.c.

__u32 crush_hash32_5 ( int  type,
__u32  a,
__u32  b,
__u32  c,
__u32  d,
__u32  e 
)

Definition at line 131 of file hash.c.

const char* crush_hash_name ( int  type)

Definition at line 141 of file hash.c.