DTS Application Library  0.2.3
Application library containing referenced objects and interfaces to common libraries
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
lookup3.c File Reference

by Bob Jenkins, May 2006, Public Domain. More...

#include <stdio.h>
#include <time.h>
#include <stdint.h>
#include <sys/param.h>

Go to the source code of this file.

Macros

#define HASH_LITTLE_ENDIAN   0
 
#define HASH_BIG_ENDIAN   0
 
#define hashsize(n)   ((uint32_t)1<<(n))
 
#define hashmask(n)   (hashsize(n)-1)
 
#define rot(x, k)   (((x)<<(k)) | ((x)>>(32-(k))))
 
#define mix(a, b, c)
 mix 3 32-bit values reversibly More...
 
#define final(a, b, c)
 final mixing of 3 32-bit values (a,b,c) into c More...
 

Functions

uint32_t hashword (const uint32_t *k, size_t length, uint32_t initval)
 hash a variable-length key into a 32-bit value (Big Endian) More...
 
void hashword2 (const uint32_t *k, size_t length, uint32_t *pc, uint32_t *pb)
 same as hashword(), but take two seeds and return two 32-bit values More...
 
uint32_t hashlittle (const void *key, size_t length, uint32_t initval)
 hash a variable-length key into a 32-bit value (Little Endian) More...
 
void hashlittle2 (const void *key, size_t length, uint32_t *pc, uint32_t *pb)
 return 2 32-bit hash values. More...
 
uint32_t hashbig (const void *key, size_t length, uint32_t initval)
 This is the same as hashword() on big-endian machines. More...
 

Detailed Description

by Bob Jenkins, May 2006, Public Domain.

Definition in file lookup3.c.