7#ifndef ZEPHYR_INCLUDE_SYS_HASH_FUNCTION_H_
8#define ZEPHYR_INCLUDE_SYS_HASH_FUNCTION_H_
73 __ASSERT(
false,
"invalid str length %zu", n);
121 if (
IS_ENABLED(CONFIG_SYS_HASH_FUNC32_CHOICE_IDENTITY)) {
125 if (
IS_ENABLED(CONFIG_SYS_HASH_FUNC32_CHOICE_DJB2)) {
129 if (
IS_ENABLED(CONFIG_SYS_HASH_FUNC32_CHOICE_MURMUR3)) {
133 __ASSERT(0,
"No default 32-bit hash. See CONFIG_SYS_HASH_FUNC32_CHOICE");
uint32_t(* sys_hash_func32_t)(const void *str, size_t n)
32-bit Hash function interface
Definition hash_function.h:41
static uint32_t sys_hash32_identity(const void *str, size_t n)
The naive identity hash function.
Definition hash_function.h:58
uint32_t sys_hash32_djb2(const void *str, size_t n)
Daniel J. Bernstein's hash function.
uint32_t sys_hash32_murmur3(const void *str, size_t n)
Murmur3 hash function.
static uint32_t sys_hash32(const void *str, size_t n)
System default 32-bit hash function.
Definition hash_function.h:119
#define IS_ENABLED(config_macro)
Check for macro definition in compiler-visible expressions.
Definition util_macro.h:140
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89