LibCDS
hash.h File Reference

The collection of well-known hash functions. More...

Go to the source code of this file.

Functions

uint32_t HashMurMur32 (Key key, size_t size)
 Google MurMur hash proposed by Austin Appleby in 2008. More...
 
uint32_t HashJenkins (Key key, size_t size)
 Hash function proposed by Bob Jenkins in 1997. More...
 

Detailed Description

The collection of well-known hash functions.

Definition in file hash.h.

Function Documentation

uint32_t HashMurMur32 ( Key  key,
size_t  size 
)

Google MurMur hash proposed by Austin Appleby in 2008.

This is the version 3 MurMur implementation to yield 32 bit hash value. https://code.google.com/p/smhasher/wiki/MurmurHash3

Parameters
keyThe designated key
sizeSize of the data pointed by the key in bytes
Note
The key should be the pointer to the data you plan to hash for.
uint32_t HashJenkins ( Key  key,
size_t  size 
)

Hash function proposed by Bob Jenkins in 1997.

Parameters
keyThe designated key
sizeSize of the data pointed by the key in bytes
Note
The key should be the pointer to the data you plan to hash for.