soa_hash_begin_32 Subroutine

private subroutine soa_hash_begin_32(hasher, schema, n)

Reset a 32-bit hash accumulator and fold in a container’s identity.

Feeds the schema string and then the element count as an explicit int64, so the digest is the same in a default build and in a PIC_DEFAULT_INT8 build. Folding the schema first means two containers with different field lists cannot produce the same digest even when their numeric payloads agree, and folding the count means an empty container is distinguishable from an absent one.

The caller then folds in every field’s live slice, in declaration order, and takes hasher%digest().

Arguments

Type IntentOptional Attributes Name
type(array_hash_t), intent(inout) :: hasher

Accumulator to restart.

character(len=*), intent(in) :: schema

The container’s schema string.

integer(kind=default_int), intent(in) :: n

Number of live elements.


Calls

proc~~soa_hash_begin_32~~CallsGraph proc~soa_hash_begin_32 soa_hash_begin_32 none~update array_hash_t%update proc~soa_hash_begin_32->none~update proc~array_hash_reset array_hash_t%array_hash_reset proc~soa_hash_begin_32->proc~array_hash_reset proc~update_cdp_0 array_hash_t%update_cdp_0 none~update->proc~update_cdp_0 proc~update_cdp_1 array_hash_t%update_cdp_1 none~update->proc~update_cdp_1 proc~update_cdp_2 array_hash_t%update_cdp_2 none~update->proc~update_cdp_2 proc~update_cdp_3 array_hash_t%update_cdp_3 none~update->proc~update_cdp_3 proc~update_char_0 array_hash_t%update_char_0 none~update->proc~update_char_0 proc~update_char_1 array_hash_t%update_char_1 none~update->proc~update_char_1 proc~update_csp_0 array_hash_t%update_csp_0 none~update->proc~update_csp_0 proc~update_csp_1 array_hash_t%update_csp_1 none~update->proc~update_csp_1 proc~update_csp_2 array_hash_t%update_csp_2 none~update->proc~update_csp_2 proc~update_csp_3 array_hash_t%update_csp_3 none~update->proc~update_csp_3 proc~update_int16_0 array_hash_t%update_int16_0 none~update->proc~update_int16_0 proc~update_int16_1 array_hash_t%update_int16_1 none~update->proc~update_int16_1 proc~update_int16_2 array_hash_t%update_int16_2 none~update->proc~update_int16_2 proc~update_int16_3 array_hash_t%update_int16_3 none~update->proc~update_int16_3 proc~update_int32_0 array_hash_t%update_int32_0 none~update->proc~update_int32_0 proc~update_int32_1 array_hash_t%update_int32_1 none~update->proc~update_int32_1 proc~update_int32_2 array_hash_t%update_int32_2 none~update->proc~update_int32_2 proc~update_int32_3 array_hash_t%update_int32_3 none~update->proc~update_int32_3 proc~update_int64_0 array_hash_t%update_int64_0 none~update->proc~update_int64_0 proc~update_int64_1 array_hash_t%update_int64_1 none~update->proc~update_int64_1 proc~update_int64_2 array_hash_t%update_int64_2 none~update->proc~update_int64_2 proc~update_int64_3 array_hash_t%update_int64_3 none~update->proc~update_int64_3 proc~update_int8_0 array_hash_t%update_int8_0 none~update->proc~update_int8_0 proc~update_int8_1 array_hash_t%update_int8_1 none~update->proc~update_int8_1 proc~update_int8_2 array_hash_t%update_int8_2 none~update->proc~update_int8_2 proc~update_int8_3 array_hash_t%update_int8_3 none~update->proc~update_int8_3 proc~update_logical_0 array_hash_t%update_logical_0 none~update->proc~update_logical_0 proc~update_logical_1 array_hash_t%update_logical_1 none~update->proc~update_logical_1 proc~update_logical_2 array_hash_t%update_logical_2 none~update->proc~update_logical_2 proc~update_logical_3 array_hash_t%update_logical_3 none~update->proc~update_logical_3 proc~update_rdp_0 array_hash_t%update_rdp_0 none~update->proc~update_rdp_0 proc~update_rdp_1 array_hash_t%update_rdp_1 none~update->proc~update_rdp_1 proc~update_rdp_2 array_hash_t%update_rdp_2 none~update->proc~update_rdp_2 proc~update_rdp_3 array_hash_t%update_rdp_3 none~update->proc~update_rdp_3 proc~update_rsp_0 array_hash_t%update_rsp_0 none~update->proc~update_rsp_0 proc~update_rsp_1 array_hash_t%update_rsp_1 none~update->proc~update_rsp_1 proc~update_rsp_2 array_hash_t%update_rsp_2 none~update->proc~update_rsp_2 proc~update_rsp_3 array_hash_t%update_rsp_3 none~update->proc~update_rsp_3 proc~feed_real_dp feed_real_dp proc~update_cdp_0->proc~feed_real_dp proc~update_cdp_1->proc~feed_real_dp proc~update_cdp_2->none~update proc~update_cdp_3->none~update proc~feed_integer feed_integer proc~update_char_0->proc~feed_integer proc~update_char_1->none~update proc~feed_real_sp feed_real_sp proc~update_csp_0->proc~feed_real_sp proc~update_csp_1->proc~feed_real_sp proc~update_csp_2->none~update proc~update_csp_3->none~update proc~update_int16_0->proc~feed_integer proc~update_int16_1->proc~feed_integer proc~update_int16_2->none~update proc~update_int16_3->none~update proc~update_int32_0->proc~feed_integer proc~update_int32_1->proc~feed_integer proc~update_int32_2->none~update proc~update_int32_3->none~update proc~update_int64_0->proc~feed_integer proc~update_int64_1->proc~feed_integer proc~update_int64_2->none~update proc~update_int64_3->none~update proc~update_int8_0->proc~feed_integer proc~update_int8_1->proc~feed_integer proc~update_int8_2->none~update proc~update_int8_3->none~update proc~feed_logical feed_logical proc~update_logical_0->proc~feed_logical proc~update_logical_1->proc~feed_logical proc~update_logical_2->none~update proc~update_logical_3->none~update proc~update_rdp_0->proc~feed_real_dp proc~update_rdp_1->proc~feed_real_dp proc~update_rdp_2->none~update proc~update_rdp_3->none~update proc~update_rsp_0->proc~feed_real_sp proc~update_rsp_1->proc~feed_real_sp proc~update_rsp_2->none~update proc~update_rsp_3->none~update proc~fnv1a_byte fnv1a_byte proc~feed_integer->proc~fnv1a_byte proc~feed_logical->proc~feed_integer proc~feed_real_record feed_real_record proc~feed_real_dp->proc~feed_real_record proc~feed_real_sp->proc~feed_real_record proc~feed_real_record->proc~feed_integer

Called by

proc~~soa_hash_begin_32~~CalledByGraph proc~soa_hash_begin_32 soa_hash_begin_32 interface~soa_hash_begin soa_hash_begin interface~soa_hash_begin->proc~soa_hash_begin_32 proc~particle_soa_state_hash particle_soa_t%particle_soa_state_hash proc~particle_soa_state_hash->interface~soa_hash_begin proc~particle_soa_state_hash64 particle_soa_t%particle_soa_state_hash64 proc~particle_soa_state_hash64->interface~soa_hash_begin

Source Code

   subroutine soa_hash_begin_32(hasher, schema, n)
      !! Reset a 32-bit hash accumulator and fold in a container's identity.
      !!
      !! Feeds the schema string and then the element count as an explicit
      !! `int64`, so the digest is the same in a default build and in a
      !! `PIC_DEFAULT_INT8` build. Folding the schema first means two
      !! containers with different field lists cannot produce the same digest
      !! even when their numeric payloads agree, and folding the count means an
      !! empty container is distinguishable from an absent one.
      !!
      !! The caller then folds in every field's live slice, in declaration
      !! order, and takes `hasher%digest()`.
      type(array_hash_t), intent(inout) :: hasher
         !! Accumulator to restart.
      character(len=*), intent(in) :: schema
         !! The container's schema string.
      integer(default_int), intent(in) :: n
         !! Number of live elements.

      call hasher%reset()
      call hasher%update(schema)
      call hasher%update(int(n, int64))
   end subroutine soa_hash_begin_32