45 static inline uint32_t hash_djb2(
const char *p_cstr) {
47 const unsigned char* chr=(
const unsigned char*)p_cstr;
52 hash = ((hash << 5) + hash) + c;
57 static inline uint32_t hash_djb2_buffer(
const uint8_t *p_buff,
int p_len,uint32_t p_prev=5381) {
59 uint32_t hash = p_prev;
61 for(
int i=0;i<p_len;i++)
62 hash = ((hash << 5) + hash) + p_buff[i];
67 static inline uint32_t hash_djb2_one_32(uint32_t p_in,uint32_t p_prev=5381) {
69 return ((p_prev<<5)+p_prev)+p_in;
72 static inline uint32_t hash_djb2_one_float(
float p_in,uint32_t p_prev=5381) {
79 return ((p_prev<<5)+p_prev)+u.i;
83 static inline uint32_t make_uint32_t(T p_in) {
95 static inline uint64_t hash_djb2_one_64(uint64_t p_in,uint64_t p_prev=5381) {
97 return ((p_prev<<5)+p_prev)+p_in;
102 static inline uint64_t make_uint64_t(T p_in) {