Motr  M0
hash_fnc.c File Reference
#include "lib/trace.h"
#include "lib/memory.h"
#include "hash_fnc.h"
Include dependency graph for hash_fnc.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LIB
 

Functions

static uint32_t swap_32 (uint32_t x)
 
static uint64_t swap_64 (uint64_t x)
 
static uint64_t fetch32 (const unsigned char *val)
 
static uint64_t fetch64 (const unsigned char *val)
 
static uint64_t rotate (uint64_t val, int shift)
 
static M0_UNUSED uint32_t rotate32 (uint32_t val, int shift)
 
M0_INTERNAL uint64_t m0_hash_fnc_fnv1 (const void *buffer, m0_bcount_t len)
 
static uint64_t hash_len16 (uint64_t u, uint64_t v, uint64_t mul)
 
static struct m0_uint128 weak_hash32_seeds_6 (uint64_t w, uint64_t x, uint64_t y, uint64_t z, uint64_t a, uint64_t b)
 
static struct m0_uint128 weak_hash32_seeds (const unsigned char *s, uint64_t a, uint64_t b)
 
static uint64_t shift_mix (uint64_t val)
 
static uint64_t hash_0to16 (const unsigned char *buffer, m0_bcount_t len)
 
static uint64_t hash_17to32 (const unsigned char *buffer, size_t len)
 
static uint64_t hash_33to64 (const unsigned char *buffer, size_t len)
 
M0_INTERNAL uint64_t m0_hash_fnc_city (const void *buffer, m0_bcount_t len)
 

Variables

static const uint64_t k0 = 0xc3a5c85c97cb3127ULL
 
static const uint64_t k1 = 0xb492b66fbe98f273ULL
 
static const uint64_t k2 = 0x9ae16a3b2f90404fULL
 
static const uint64_t def_mul = 0x9ddfea08eb382d69ULL