#include "system.h"
#include "rpmiotypes.h"
#include "debug.h"
Go to the source code of this file.
#define _JLU3_FINAL |
( |
|
a, |
|
|
|
b, |
|
|
|
c |
|
) |
| |
Value:
_JLU3_FINAL – final mixing of 3 32-bit values (a,b,c) into c
Pairs of (a,b,c) values differing in only a few bits will usually produce values of c that look totally different. This was tested for
- pairs that differed by one bit, by two bits, in any combination of top bits of (a,b,c), or in any combination of bottom bits of (a,b,c).
- "differ" is defined as +, -, ^, or ~^. For + and -, I transformed the output delta to a Gray code (a^(a>>1)) so a string of 1's (as is commonly produced by subtraction) look like a single 1-bit difference.
- the base values were pseudorandom, all zero but one bit set, or all zero plus a counter that starts at zero.
These constants passed: 14 11 25 16 4 14 24 12 14 25 16 4 14 24 and these came close: 4 8 15 26 3 22 24 10 8 15 26 3 22 24 11 8 15 26 3 22 24
Definition at line 154 of file lookup3.c.
#define _JLU3_INIT |
( |
|
_h, |
|
|
|
_size |
|
) |
| (0xdeadbeef + ((rpmuint32_t)(_size)) + (_h)) |
#define _JLU3_MIX |
( |
|
a, |
|
|
|
b, |
|
|
|
c |
|
) |
| |
#define HASH_BIG_ENDIAN (endian.uc[0] == (unsigned char) 0x11) |
#define HASH_LITTLE_ENDIAN (endian.uc[0] == (unsigned char) 0x44) |
#define ROTL32 |
( |
|
x, |
|
|
|
s |
|
) |
| (((x) << (s)) | ((x) >> (32 - (s)))) |
const union _dbswap endian = { 0x11223344 } |
|
static |