A streaming 32-bit FNV-1a accumulator over array state.
A freshly declared array_hash_t is already seeded with
ARRAY_HASH_OFFSET_BASIS, so no explicit initialisation call is
needed. Feed it with update, read it with digest, and start over
with reset.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int64), | private | :: | nbytes | = | 0_int64 |
Number of encoded bytes consumed so far. Fixed-width |
|
| integer(kind=int32), | private | :: | state | = | ARRAY_HASH_OFFSET_BASIS |
Running hash. Fixed-width |
Number of encoded bytes consumed so far.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(in) | :: | this |
The digest of everything fed in so far.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(in) | :: | this |
Return the accumulator to its initial state.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int32), | intent(in), | optional | :: | seed |
Starting hash value; defaults to |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int8), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int8), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int8), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int8), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int16), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int16), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int16), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int16), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int32), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int32), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int32), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int32), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=sp), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=sp), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=sp), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=sp), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=dp), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=dp), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=dp), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=dp), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=sp), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=sp), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=sp), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=sp), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=dp), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=dp), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=dp), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=dp), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| logical, | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| logical, | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| logical, | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| logical, | intent(in) | :: | key(:,:,:) |
Feed a character string, one iachar byte per character.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=dp), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=dp), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=dp), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=dp), | intent(in) | :: | key(:,:,:) |
Feed a character string, one iachar byte per character.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=sp), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=sp), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=sp), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| complex(kind=sp), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int16), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int16), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int16), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int16), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int32), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int32), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int32), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int32), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int8), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int8), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int8), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| integer(kind=int8), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| logical, | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| logical, | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| logical, | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| logical, | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=dp), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=dp), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=dp), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=dp), | intent(in) | :: | key(:,:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=sp), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=sp), | intent(in) | :: | key(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=sp), | intent(in) | :: | key(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_hash_t), | intent(inout) | :: | this | |||
| real(kind=sp), | intent(in) | :: | key(:,:,:) |
type :: array_hash_t !! A streaming 32-bit FNV-1a accumulator over array state. !! !! A freshly declared `array_hash_t` is already seeded with !! `ARRAY_HASH_OFFSET_BASIS`, so no explicit initialisation call is !! needed. Feed it with `update`, read it with `digest`, and start over !! with `reset`. private integer(int32) :: state = ARRAY_HASH_OFFSET_BASIS !! Running hash. Fixed-width `int32`, because FNV-1a is defined !! modulo 2**32. integer(int64) :: nbytes = 0_int64 !! Number of encoded bytes consumed so far. Fixed-width `int64` so !! that hashing more than 2 GiB of state cannot overflow the counter !! in a `default_int` == `int32` build. contains procedure :: reset => array_hash_reset procedure :: digest => array_hash_digest procedure :: bytes_hashed => array_hash_bytes_hashed generic :: update => & update_int8_0, & update_int8_1, & update_int8_2, & update_int8_3, & update_int16_0, & update_int16_1, & update_int16_2, & update_int16_3, & update_int32_0, & update_int32_1, & update_int32_2, & update_int32_3, & update_int64_0, & update_int64_1, & update_int64_2, & update_int64_3, & update_rsp_0, & update_rsp_1, & update_rsp_2, & update_rsp_3, & update_rdp_0, & update_rdp_1, & update_rdp_2, & update_rdp_3, & update_csp_0, & update_csp_1, & update_csp_2, & update_csp_3, & update_cdp_0, & update_cdp_1, & update_cdp_2, & update_cdp_3, & update_logical_0, & update_logical_1, & update_logical_2, & update_logical_3, & update_char_0, & update_char_1 procedure, private :: update_int8_0 procedure, private :: update_int8_1 procedure, private :: update_int8_2 procedure, private :: update_int8_3 procedure, private :: update_int16_0 procedure, private :: update_int16_1 procedure, private :: update_int16_2 procedure, private :: update_int16_3 procedure, private :: update_int32_0 procedure, private :: update_int32_1 procedure, private :: update_int32_2 procedure, private :: update_int32_3 procedure, private :: update_int64_0 procedure, private :: update_int64_1 procedure, private :: update_int64_2 procedure, private :: update_int64_3 procedure, private :: update_rsp_0 procedure, private :: update_rsp_1 procedure, private :: update_rsp_2 procedure, private :: update_rsp_3 procedure, private :: update_rdp_0 procedure, private :: update_rdp_1 procedure, private :: update_rdp_2 procedure, private :: update_rdp_3 procedure, private :: update_csp_0 procedure, private :: update_csp_1 procedure, private :: update_csp_2 procedure, private :: update_csp_3 procedure, private :: update_cdp_0 procedure, private :: update_cdp_1 procedure, private :: update_cdp_2 procedure, private :: update_cdp_3 procedure, private :: update_logical_0 procedure, private :: update_logical_1 procedure, private :: update_logical_2 procedure, private :: update_logical_3 procedure, private :: update_char_0 procedure, private :: update_char_1 end type array_hash_t