DPDK
2.0.0
|
#include <stdint.h>
Macros | |
#define | RTE_JHASH_GOLDEN_RATIO 0x9e3779b9 |
Functions | |
static uint32_t | rte_jhash (const void *key, uint32_t length, uint32_t initval) |
static uint32_t | rte_jhash2 (const uint32_t *k, uint32_t length, uint32_t initval) |
static uint32_t | rte_jhash_3words (uint32_t a, uint32_t b, uint32_t c, uint32_t initval) |
static uint32_t | rte_jhash_2words (uint32_t a, uint32_t b, uint32_t initval) |
static uint32_t | rte_jhash_1word (uint32_t a, uint32_t initval) |
jhash functions.
#define RTE_JHASH_GOLDEN_RATIO 0x9e3779b9 |
The golden ratio: an arbitrary value.
|
inlinestatic |
The most generic version, hashes an arbitrary sequence of bytes. No alignment or length assumptions are made about the input key.
key | Key to calculate hash of. |
length | Length of key in bytes. |
initval | Initialising value of hash. |
|
inlinestatic |
A special optimized version that handles 1 or more of uint32_ts. The length parameter here is the number of uint32_ts in the key.
k | Key to calculate hash of. |
length | Length of key in units of 4 bytes. |
initval | Initialising value of hash. |
|
inlinestatic |
A special ultra-optimized versions that knows it is hashing exactly 1 word.
a | Word to calcuate hash of. |
initval | Initialising value of hash. |
|
inlinestatic |
A special ultra-optimized versions that knows it is hashing exactly 2 words.
a | First word to calcuate hash of. |
b | Second word to calcuate hash of. |
initval | Initialising value of hash. |
|
inlinestatic |
A special ultra-optimized versions that knows it is hashing exactly 3 words.
a | First word to calcuate hash of. |
b | Second word to calcuate hash of. |
c | Third word to calcuate hash of. |
initval | Initialising value of hash. |