2013-11-07 16:18:54 +00:00
|
|
|
/* Generated File, DO NOT EDIT */
|
|
|
|
/* table for the mapping for the perfect hash */
|
|
|
|
#ifndef STANDARD
|
|
|
|
#include "standard.h"
|
|
|
|
#endif /* STANDARD */
|
|
|
|
#ifndef PHASH
|
|
|
|
#include "phash.h"
|
|
|
|
#endif /* PHASH */
|
|
|
|
#ifndef LOOKUPA
|
|
|
|
#include "lookupa.h"
|
|
|
|
#endif /* LOOKUPA */
|
|
|
|
|
|
|
|
/* small adjustments to _a_ to make values distinct */
|
|
|
|
ub1 tab[] = {
|
2013-11-22 15:14:26 +00:00
|
|
|
125,0,0,220,235,125,82,0,113,0,0,7,0,0,82,0,
|
|
|
|
0,0,7,124,0,0,82,0,0,125,0,7,0,220,125,120,
|
|
|
|
0,0,0,0,22,0,0,113,0,113,113,0,0,125,85,0,
|
|
|
|
113,0,11,113,125,7,0,0,0,40,0,113,85,0,0,125,
|
|
|
|
0,113,0,0,113,0,125,183,40,27,7,15,58,183,113,0,
|
|
|
|
124,0,0,22,125,220,0,40,0,87,87,125,113,0,183,125,
|
|
|
|
0,125,87,7,0,85,0,0,59,229,85,7,135,116,0,146,
|
|
|
|
0,0,82,0,0,0,200,0,56,125,0,0,61,202,0,0,
|
2013-11-07 16:18:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* The hash function */
|
|
|
|
ub4 phash(char *key, int len)
|
|
|
|
{
|
|
|
|
ub4 rsl, val = lookup(key, len, 0x9e3779b9);
|
2013-11-08 18:20:28 +00:00
|
|
|
rsl = ((val>>25)^tab[val&0x7f]);
|
2013-11-07 16:18:54 +00:00
|
|
|
return rsl;
|
|
|
|
}
|
|
|
|
|