1# Copyright (c) 2022 Meta 2# 3# SPDX-License-Identifier: Apache-2.0 4 5menu "Hash Function Support" 6 7config SYS_HASH_FUNC32 8 bool "Hash function support" 9 help 10 Enable this option to support hash functions. 11 12if SYS_HASH_FUNC32 13 14config SYS_HASH_FUNC32_DJB2 15 bool "Daniel J. Bernstein's hash function (djb2)" 16 17config SYS_HASH_FUNC32_MURMUR3 18 bool "Murmur3 hash function" 19 20choice SYS_HASH_FUNC32_CHOICE 21 prompt "Default system-wide 32-bit hash function" 22 default SYS_HASH_FUNC32_CHOICE_MURMUR3 23 help 24 The default system-wide 32-bit hash function is sys_hash32(). 25 26config SYS_HASH_FUNC32_CHOICE_DJB2 27 bool "Default 32-bit hash is djb2" 28 select SYS_HASH_FUNC32_DJB2 29 30config SYS_HASH_FUNC32_CHOICE_MURMUR3 31 bool "Default 32-bit hash is Murmur3" 32 select SYS_HASH_FUNC32_MURMUR3 33 34config SYS_HASH_FUNC32_CHOICE_IDENTITY 35 bool "Default 32-bit hash is the identity" 36 help 37 This is the naive identity hash function. It only works for strings 38 either 1, 2, 4, or 8 bytes in length and so is suitable for scalar 39 values such as keys in a Hashmap. It is implemented as a static 40 inline function. 41 42endchoice # SYS_HASH_FUNC_CHOICE 43 44endif # SYS_HASH_FUNC 45 46endmenu 47