pic_hash_32bit.f90 Source File

Contains the 32 bit hashing routines


This file depends on

sourcefile~~pic_hash_32bit.f90~~EfferentGraph sourcefile~pic_hash_32bit.f90 pic_hash_32bit.f90 sourcefile~pic_hash_32bit_fnv.f90 pic_hash_32bit_fnv.f90 sourcefile~pic_hash_32bit.f90->sourcefile~pic_hash_32bit_fnv.f90 sourcefile~pic_types.f90 pic_types.F90 sourcefile~pic_hash_32bit.f90->sourcefile~pic_types.f90 sourcefile~pic_hash_32bit_fnv.f90->sourcefile~pic_types.f90

Source Code

! SPDX-License-Identifier: MIT
! Integrated from the Fortran Standard Library licensed under MIT
! Copyright (c) 2025 Jorge Luis Galvez Vallejo
!! Contains the 32 bit hashing routines

module pic_hash_32bit
!! module for pic's 32 bit hashing algorithms

   use pic_hash_32bit_fnv, only: fnv_1_hash, fnv_1a_hash
   use pic_types, only: &
      dp, &
      int32, &
      int64

   implicit none

   private

! pow32_over_phi is the odd integer that most closely approximates 2**32/phi,
! where phi is the golden ratio 1.618...
   integer(int32), parameter :: &
      pow32_over_phi = int(z'9E3779B9', int32)

   public :: &
      fnv_1_hash, &
      fnv_1a_hash

end module pic_hash_32bit