seeded_nmhash32_hasher 函数

public pure function seeded_nmhash32_hasher(key)

使用 NMHASH32 哈希算法对键进行哈希 (规范)

参数:key - 要哈希的键 seed - 哈希算法的种子(未使用)

参数

类型 意图可选 属性 名称
type(key_type), intent(in) :: key

返回值 integer(kind=int_hash)


源代码

    pure function seeded_nmhash32_hasher( key )
!! Version: Experimental
!!
!! Hashes a key with the NMHASH32 hash algorithm
!! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_nmhash32_hasher-calculates-a-hash-code-from-a-key))
!!
!! Arguments:
!!     key  - the key to be hashed
!!     seed - the seed (unused) for the hashing algorithm
        type(key_type), intent(in)    :: key
        integer(int_hash)             :: seeded_nmhash32_hasher

        seeded_nmhash32_hasher = nmhash32( key % value, &
            int( z'DEADBEEF', int32 ) )

    end function seeded_nmhash32_hasher