FreeBSD kernel CXGB device code
jhash.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __jhash_mix(a, b, c)
 
#define JHASH_GOLDEN_RATIO   0x9e3779b9
 

Functions

static u32 jhash (const void *key, u32 length, u32 initval)
 
static u32 jhash2 (u32 *k, u32 length, u32 initval)
 
static u32 jhash_3words (u32 a, u32 b, u32 c, u32 initval)
 
static u32 jhash_2words (u32 a, u32 b, u32 initval)
 
static u32 jhash_1word (u32 a, u32 initval)
 

Macro Definition Documentation

◆ __jhash_mix

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

Definition at line 21 of file jhash.h.

◆ JHASH_GOLDEN_RATIO

#define JHASH_GOLDEN_RATIO   0x9e3779b9

Definition at line 35 of file jhash.h.

Function Documentation

◆ jhash()

static u32 jhash ( const void *  key,
u32  length,
u32  initval 
)
inlinestatic

Definition at line 41 of file jhash.h.

References __jhash_mix, and JHASH_GOLDEN_RATIO.

◆ jhash2()

static u32 jhash2 ( u32 k,
u32  length,
u32  initval 
)
inlinestatic

Definition at line 84 of file jhash.h.

References __jhash_mix, and JHASH_GOLDEN_RATIO.

◆ jhash_1word()

static u32 jhash_1word ( u32  a,
u32  initval 
)
inlinestatic

Definition at line 135 of file jhash.h.

References jhash_3words().

Here is the call graph for this function:

◆ jhash_2words()

static u32 jhash_2words ( u32  a,
u32  b,
u32  initval 
)
inlinestatic

Definition at line 130 of file jhash.h.

References jhash_3words().

Here is the call graph for this function:

◆ jhash_3words()

static u32 jhash_3words ( u32  a,
u32  b,
u32  c,
u32  initval 
)
inlinestatic

Definition at line 119 of file jhash.h.

References __jhash_mix, and JHASH_GOLDEN_RATIO.

Referenced by jhash_1word(), and jhash_2words().

Here is the caller graph for this function: