stdlib_hash_32bit#
See also the specification page: stdlib_hash_32bit and stdlib_hash_64bit.
stdlib_hash_32bit (module)#
Variables
- int_hashinteger, parameter, Default = int32
The number of bits in the output hash
- little_endianlogical, parameter, Default = (1==transfer([1_int8, 0_int8], 0_int16))
Interfaces
fnv_1_hash (interface)#
-
fnv_1_hash (interface) FNV_1 interfaces (Specification: stdlib_hash_32bit and stdlib_hash_64bit)
- Procedures:
-
pure module function int8_fnv_1(key) -> hash_code# FNV_1 hash function for rank 1 array keys of kind int8
- Arguments:
- keyinteger(kind=int8), intent(in), dimension(:)
- Returns:
- hash_codeinteger(kind=int_hash)
-
pure module function int16_fnv_1(key) -> hash_code# FNV_1 hash function for rank 1 array keys of kind int16
- Arguments:
- keyinteger(kind=int16), intent(in), dimension(:)
- Returns:
- hash_codeinteger(kind=int_hash)
-
pure module function int32_fnv_1(key) -> hash_code# FNV_1 hash function for rank 1 array keys of kind int32
- Arguments:
- keyinteger(kind=int32), intent(in), dimension(:)
- Returns:
- hash_codeinteger(kind=int_hash)
-
pure module function int64_fnv_1(key) -> hash_code# FNV_1 hash function for rank 1 array keys of kind int64
- Arguments:
- keyinteger(kind=int64), intent(in), dimension(:)
- Returns:
- hash_codeinteger(kind=int_hash)
-
elemental module function character_fnv_1(key) -> hash_code# FNV_1 hash function for default character string keys
- Arguments:
- keycharacter(len=*), intent(in)
- Returns:
- hash_codeinteger(kind=int_hash)
fnv_1a_hash (interface)#
-
fnv_1a_hash (interface) FNV_1A interfaces (Specification: stdlib_hash_32bit and stdlib_hash_64bit)
- Procedures:
-
pure module function int8_fnv_1a(key) -> hash_value# FNV_1A hash function for rank 1 array keys of kind int8
- Arguments:
- keyinteger(kind=int8), intent(in), dimension(:)
- Returns:
- hash_valueinteger(kind=int_hash)
-
pure module function int16_fnv_1a(key) -> hash_value# FNV_1A hash function for rank 1 array keys of kind int16
- Arguments:
- keyinteger(kind=int16), intent(in), dimension(:)
- Returns:
- hash_valueinteger(kind=int_hash)
-
pure module function int32_fnv_1a(key) -> hash_value# FNV_1A hash function for rank 1 array keys of kind int32
- Arguments:
- keyinteger(kind=int32), intent(in), dimension(:)
- Returns:
- hash_valueinteger(kind=int_hash)
-
pure module function int64_fnv_1a(key) -> hash_value# FNV_1A hash function for rank 1 array keys of kind int64
- Arguments:
- keyinteger(kind=int64), intent(in), dimension(:)
- Returns:
- hash_valueinteger(kind=int_hash)
-
elemental module function character_fnv_1a(key) -> hash_value# FNV_1A hash function for default character string keys
- Arguments:
- keycharacter(len=*), intent(in)
- Returns:
- hash_valueinteger(kind=int_hash)
nmhash32 (interface)#
-
nmhash32 (interface) NMHASH32 interfaces (Specification: stdlib_hash_32bit and stdlib_hash_64bit)
-
pure module function int8_nmhash32(key, seed) -> hash_value# NMHASH32 hash function for rank 1 array keys of kind int8
- Arguments:
- keyinteger(kind=int8), intent(in), dimension(0:)
- seedinteger(kind=int32), intent(in)
- Returns:
- hash_valueinteger(kind=int32)
-
pure module function int16_nmhash32(key, seed) -> hash_value# NMHASH32 hash function for rank 1 array keys of kind int16
- Arguments:
- keyinteger(kind=int16), intent(in), dimension(0:)
- seedinteger(kind=int32), intent(in)
- Returns:
- hash_valueinteger(kind=int32)
-
pure module function int32_nmhash32(key, seed) -> hash_value# NMHASH32 hash function for rank 1 array keys of kind int32
- Arguments:
- keyinteger(kind=int32), intent(in), dimension(0:)
- seedinteger(kind=int32), intent(in)
- Returns:
- hash_valueinteger(kind=int32)
-
pure module function int64_nmhash32(key, seed) -> hash_value# NMHASH32 hash function for rank 1 array keys of kind int64
- Arguments:
- keyinteger(kind=int64), intent(in), dimension(0:)
- seedinteger(kind=int32), intent(in)
- Returns:
- hash_valueinteger(kind=int32)
-
elemental module function character_nmhash32(key, seed) -> hash_value# NMHASH32 hash function for default character string keys
- Arguments:
- keycharacter(len=*), intent(in)
- seedinteger(kind=int32), intent(in)
- Returns:
- hash_valueinteger(kind=int32)
-
nmhash32x (interface)#
-
nmhash32x (interface) NMHASH32X interfaces (Specification: stdlib_hash_32bit and stdlib_hash_64bit)
-
pure module function int8_nmhash32x(key, seed) -> hash_value# NMHASH32 hash function for rank 1 array keys of kind int8
- Arguments:
- keyinteger(kind=int8), intent(in), dimension(0:)
- seedinteger(kind=int32), intent(in)
- Returns:
- hash_valueinteger(kind=int32)
-
pure module function int16_nmhash32x(key, seed) -> hash_value# NMHASH32 hash function for rank 1 array keys of kind int16
- Arguments:
- keyinteger(kind=int16), intent(in), dimension(0:)
- seedinteger(kind=int32), intent(in)
- Returns:
- hash_valueinteger(kind=int32)
-
pure module function int32_nmhash32x(key, seed) -> hash_value# NMHASH32 hash function for rank 1 array keys of kind int32
- Arguments:
- keyinteger(kind=int32), intent(in), dimension(0:)
- seedinteger(kind=int32), intent(in)
- Returns:
- hash_valueinteger(kind=int32)
-
pure module function int64_nmhash32x(key, seed) -> hash_value# NMHASH32 hash function for rank 1 array keys of kind int64
- Arguments:
- keyinteger(kind=int64), intent(in), dimension(0:)
- seedinteger(kind=int32), intent(in)
- Returns:
- hash_valueinteger(kind=int32)
-
elemental module function character_nmhash32x(key, seed) -> hash_value# NMHASH32 hash function for default character string keys
- Arguments:
- keycharacter(len=*), intent(in)
- seedinteger(kind=int32), intent(in)
- Returns:
- hash_valueinteger(kind=int32)
-
water_hash (interface)#
-
water_hash (interface) WATER_HASH interfaces (Specification: stdlib_hash_32bit and stdlib_hash_64bit)
-
pure module function int8_water_hash(key, seed) -> hash_code# WATER HASH function for rank 1 array keys of kind int8
- Arguments:
- keyinteger(kind=int8), intent(in), dimension(0:)
- seedinteger(kind=int64), intent(in)
- Returns:
- hash_codeinteger(kind=int_hash)
-
pure module function int16_water_hash(key, seed) -> hash_code# WATER HASH function for rank 1 array keys of kind int16
- Arguments:
- keyinteger(kind=int16), intent(in), dimension(0:)
- seedinteger(kind=int64), intent(in)
- Returns:
- hash_codeinteger(kind=int_hash)
-
pure module function int32_water_hash(key, seed) -> hash_code# WATER HASH function for rank 1 array keys of kind int32
- Arguments:
- keyinteger(kind=int32), intent(in), dimension(0:)
- seedinteger(kind=int64), intent(in)
- Returns:
- hash_codeinteger(kind=int_hash)
-
pure module function int64_water_hash(key, seed) -> hash_code# WATER HASH function for rank 1 array keys of kind int64
- Arguments:
- keyinteger(kind=int64), intent(in), dimension(0:)
- seedinteger(kind=int64), intent(in)
- Returns:
- hash_codeinteger(kind=int_hash)
-
elemental module function character_water_hash(key, seed) -> hash_code# WATER hash function for default character string keys
- Arguments:
- keycharacter(len=*), intent(in)
- seedinteger(kind=int64), intent(in)
- Returns:
- hash_codeinteger(kind=int_hash)
-
new_water_hash_seed (interface)#
-
module subroutine new_water_hash_seed(seed) (Specification: stdlib_hash_32bit and stdlib_hash_64bit)
- Arguments:
- seedinteger(kind=int64), intent(inout)
new_nmhash32_seed (interface)#
-
module subroutine new_nmhash32_seed(seed) (Specification: stdlib_hash_32bit and stdlib_hash_64bit)
- Arguments:
- seedinteger(kind=int32), intent(inout)
new_nmhash32x_seed (interface)#
-
module subroutine new_nmhash32x_seed(seed) (Specification: stdlib_hash_32bit and stdlib_hash_64bit)
- Arguments:
- seedinteger(kind=int32), intent(inout)
Procedures
fibonacci_hash (function)#
-
elemental function fibonacci_hash(key, nbits) -> sample Maps the 32 bit integer key to an unsigned integer value with only nbits bits where nbits is less than 32 (Specification: stdlib_hash_32bit and stdlib_hash_64bit)
- Arguments:
- keyinteger(kind=int32), intent(in)
- nbitsinteger, intent(in)
- Returns:
- sampleinteger(kind=int32)
universal_mult_hash (function)#
-
elemental function universal_mult_hash(key, seed, nbits) -> sample Uses the “random” odd 32 bit integer seed to map the 32 bit integer key to an unsigned integer value with only nbits bits where nbits is less than 32 (Specification: stdlib_hash_32bit and stdlib_hash_64bit)
- Arguments:
- keyinteger(kind=int32), intent(in)
- seedinteger(kind=int32), intent(in)
- nbitsinteger, intent(in)
- Returns:
- sampleinteger(kind=int32)
odd_random_integer (subroutine)#
-
subroutine odd_random_integer(harvest) Returns a 32 bit pseudo random integer, harvest, distributed uniformly over the odd integers of the int32 kind. (Specification: stdlib_hash_32bit and stdlib_hash_64bit)
- Arguments:
- harvestinteger(kind=int32), intent(out)