File: example_hashmaps_rehash.f90

package info (click to toggle)
fortran-stdlib 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 34,008 kB
  • sloc: f90: 24,178; ansic: 1,244; cpp: 623; python: 119; makefile: 13
file content (13 lines) | stat: -rw-r--r-- 463 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
program example_rehash
  use stdlib_kinds, only: int8
  use stdlib_hashmaps, only: open_hashmap_type
  use stdlib_hashmap_wrappers, only: fnv_1a_hasher, &
                                     key_type, set
  implicit none
  type(open_hashmap_type) :: map
  type(key_type)      :: key
  call map%init(slots_bits=10)
  call set(key, [5_int8, 7_int8, 4_int8, 13_int8])
  call map%map_entry(key, 'A value')
  call map%rehash(fnv_1a_hasher)
end program example_rehash