COMBINATORIAL_BLAS  1.6
tommyhash.h File Reference
#include "tommytypes.h"

Go to the source code of this file.

Typedefs

typedef tommy_key_t tommy_hash_t
 

Functions

tommy_uint32_t tommy_hash_u32 (tommy_uint32_t init_val, const void *void_key, tommy_size_t key_len)
 
tommy_uint64_t tommy_hash_u64 (tommy_uint64_t init_val, const void *void_key, tommy_size_t key_len)
 
tommy_inline tommy_uint32_t tommy_inthash_u32 (tommy_uint32_t key)
 
tommy_inline tommy_uint64_t tommy_inthash_u64 (tommy_uint64_t key)
 

Detailed Description

Hash functions for the use with ::tommy_hashtable, tommy_hashdyn and ::tommy_hashlin.

Definition in file tommyhash.h.

Typedef Documentation

◆ tommy_hash_t

Hash type used in hashtables.

Definition at line 43 of file tommyhash.h.

Function Documentation

◆ tommy_hash_u32()

tommy_uint32_t tommy_hash_u32 ( tommy_uint32_t  init_val,
const void *  void_key,
tommy_size_t  key_len 
)

Hash function with a 32 bits result. Implementation of the Robert Jenkins "lookup3" hash 32 bits version, from http://www.burtleburtle.net/bob/hash/doobs.html, function hashlittle().

Parameters
init_valInitialization value. Using a different initialization value, you can generate a completely different set of hash values. Use 0 if not relevant.
void_keyPointer at the data to hash.
key_lenSize of the data to hash.
Note
This function is endianess independent.
Returns
The hash value of 32 bits.

◆ tommy_hash_u64()

tommy_uint64_t tommy_hash_u64 ( tommy_uint64_t  init_val,
const void *  void_key,
tommy_size_t  key_len 
)

Hash function with a 64 bits result. Implementation of the Robert Jenkins "lookup3" hash 64 bits versions, from http://www.burtleburtle.net/bob/hash/doobs.html, function hashlittle2().

Parameters
init_valInitialization value. Using a different initialization value, you can generate a completely different set of hash values. Use 0 if not relevant.
void_keyPointer at the data to hash.
key_lenSize of the data to hash.
Note
This function is endianess independent.
Returns
The hash value of 64 bits.

◆ tommy_inthash_u32()

tommy_inline tommy_uint32_t tommy_inthash_u32 ( tommy_uint32_t  key)

Integer hash of 32 bits. Implementation of the Robert Jenkins "4-byte Integer Hashing", from http://burtleburtle.net/bob/hash/integer.html

Definition at line 80 of file tommyhash.h.

◆ tommy_inthash_u64()

tommy_inline tommy_uint64_t tommy_inthash_u64 ( tommy_uint64_t  key)

Integer hash of 64 bits. Implementation of the Thomas Wang "Integer Hash Function", from http://www.cris.com/~Ttwang/tech/inthash.htm

Definition at line 98 of file tommyhash.h.