rebuild_buckets Subroutine

private subroutine rebuild_buckets(this)

Re-index every entry into the bucket table. Touches buckets only, so the insertion order is untouched by construction.

Arguments

Type IntentOptional Attributes Name
class(hash_map_t), intent(inout) :: this

Calls

proc~~rebuild_buckets~~CallsGraph proc~rebuild_buckets rebuild_buckets proc~entry_key entry_key proc~rebuild_buckets->proc~entry_key proc~probe_free probe_free proc~rebuild_buckets->proc~probe_free proc~home_bucket home_bucket proc~probe_free->proc~home_bucket interface~fnv_1a_hash fnv_1a_hash proc~home_bucket->interface~fnv_1a_hash

Called by

proc~~rebuild_buckets~~CalledByGraph proc~rebuild_buckets rebuild_buckets proc~grow_buckets grow_buckets proc~grow_buckets->proc~rebuild_buckets proc~hash_map_remove hash_map_t%hash_map_remove proc~hash_map_remove->proc~rebuild_buckets proc~hash_map_insert hash_map_t%hash_map_insert proc~hash_map_insert->proc~grow_buckets

Variables

Type Visibility Attributes Name Initial
integer(kind=default_int), private :: i

Source Code

   subroutine rebuild_buckets(this)
      !! Re-index every entry into the bucket table. Touches buckets only, so
      !! the insertion order is untouched by construction.
      class(hash_map_t), intent(inout) :: this

      integer(default_int) :: i

      this%buckets = BUCKET_EMPTY
      do i = 1, this%n_entries
         this%buckets(probe_free(this, entry_key(this, i))) = i
      end do
   end subroutine rebuild_buckets