Macros | Functions
Hasher.C File Reference

Hashing functions, mostly from Bob Jenkins. More...

Include dependency graph for Hasher.C:

Go to the source code of this file.

Macros

#define bitRotateLeft(x, nBits)   (((x) << (nBits)) | ((x) >> (32 - (nBits))))
 
#define bitMixer(a, b, c)
 
#define bitMixerFinal(a, b, c)
 

Functions

static unsigned jenkins_hashlittle (const void *key, size_t length, unsigned initval)
 
static unsigned jenkins_hashbig (const void *key, size_t length, unsigned initval)
 

Detailed Description

Hashing functions, mostly from Bob Jenkins.

Original source file Hasher.C

Definition in file Hasher.C.

Macro Definition Documentation

#define bitRotateLeft (   x,
  nBits 
)    (((x) << (nBits)) | ((x) >> (32 - (nBits))))

Definition at line 36 of file Hasher.C.

#define bitMixer (   a,
  b,
 
)
Value:
{ \
a -= c; a ^= bitRotateLeft(c, 4); c += b; \
b -= a; b ^= bitRotateLeft(a, 6); a += c; \
c -= b; c ^= bitRotateLeft(b, 8); b += a; \
a -= c; a ^= bitRotateLeft(c,16); c += b; \
b -= a; b ^= bitRotateLeft(a,19); a += c; \
c -= b; c ^= bitRotateLeft(b, 4); b += a; \
}
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:27
const dimensionedScalar c
Speed of light in a vacuum.
#define bitRotateLeft(x, nBits)
Definition: Hasher.C:36

Definition at line 116 of file Hasher.C.

Referenced by Foam::HasherDual(), Foam::HasherInt(), jenkins_hashbig(), and jenkins_hashlittle().

#define bitMixerFinal (   a,
  b,
 
)
Value:
{ \
c ^= b; c -= bitRotateLeft(b, 14); \
a ^= c; a -= bitRotateLeft(c, 11); \
b ^= a; b -= bitRotateLeft(a, 25); \
c ^= b; c -= bitRotateLeft(b, 16); \
a ^= c; a -= bitRotateLeft(c, 4); \
b ^= a; b -= bitRotateLeft(a, 14); \
c ^= b; c -= bitRotateLeft(b, 24); \
}
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:27
const dimensionedScalar c
Speed of light in a vacuum.
#define bitRotateLeft(x, nBits)
Definition: Hasher.C:36

Definition at line 151 of file Hasher.C.

Referenced by Foam::HasherDual(), Foam::HasherInt(), jenkins_hashbig(), and jenkins_hashlittle().

Function Documentation

static unsigned jenkins_hashlittle ( const void *  key,
size_t  length,
unsigned  initval 
)
static

Definition at line 193 of file Hasher.C.

References Foam::constant::physicoChemical::b, bitMixer, bitMixerFinal, Foam::constant::universal::c, jenkins_hashbig(), and k.

Referenced by Foam::Hasher().

Here is the call graph for this function:

Here is the caller graph for this function:

static unsigned jenkins_hashbig ( const void *  key,
size_t  length,
unsigned  initval 
)
static

Definition at line 371 of file Hasher.C.

References Foam::constant::physicoChemical::b, bitMixer, bitMixerFinal, Foam::constant::universal::c, Foam::Hasher(), and k.

Referenced by Foam::Hasher(), and jenkins_hashlittle().

Here is the call graph for this function:

Here is the caller graph for this function: