The SplitMix64 finalising mix (the “MurmurHash3-style” avalanche used
by splitmix64.c). Used both as the generator output stage and as the
seed derivation function for stream_for.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | x |
pure function mix64(x) result(r) !! The SplitMix64 finalising mix (the "MurmurHash3-style" avalanche used !! by `splitmix64.c`). Used both as the generator output stage and as the !! seed derivation function for `stream_for`. integer(int64), intent(in) :: x integer(int64) :: r r = u64_mul(ieor(x, u64_shr(x, 30_default_int)), MIX_C1) r = u64_mul(ieor(r, u64_shr(r, 27_default_int)), MIX_C2) r = ieor(r, u64_shr(r, 31_default_int)) end function mix64