particle_soa_state_hash64 Function

private function particle_soa_state_hash64(this) result(digest)

64-bit FNV-1a digest of the container’s live state.

Byte for byte the same stream as state_hash: the schema string, the element count as an explicit int64, then every field’s live slice in declaration order. Only the digest width differs.

Prefer this one when digests are used as identifiers rather than compared pairwise – a determinism log keyed by digest, or deduplicating identical states. Among 10**5 distinct 32-bit digests the chance that some pair collides is about 69%; at 64 bits it is 3e-10.

Type Bound

particle_soa_t

Arguments

Type IntentOptional Attributes Name
class(particle_soa_t), intent(in) :: this

Container to fingerprint.

Return Value integer(kind=int64)


Calls

proc~~particle_soa_state_hash64~~CallsGraph proc~particle_soa_state_hash64 particle_soa_t%particle_soa_state_hash64 interface~soa_hash_begin soa_hash_begin proc~particle_soa_state_hash64->interface~soa_hash_begin interface~soa_hash_field soa_hash_field proc~particle_soa_state_hash64->interface~soa_hash_field proc~array_hash64_digest array_hash64_t%array_hash64_digest proc~particle_soa_state_hash64->proc~array_hash64_digest proc~soa_hash_begin_32 soa_hash_begin_32 interface~soa_hash_begin->proc~soa_hash_begin_32 proc~soa_hash_begin_64 soa_hash_begin_64 interface~soa_hash_begin->proc~soa_hash_begin_64 proc~soa_hash64_int32_field soa_hash64_int32_field interface~soa_hash_field->proc~soa_hash64_int32_field proc~soa_hash64_int64_field soa_hash64_int64_field interface~soa_hash_field->proc~soa_hash64_int64_field proc~soa_hash64_logical_field soa_hash64_logical_field interface~soa_hash_field->proc~soa_hash64_logical_field proc~soa_hash64_real_dp_field soa_hash64_real_dp_field interface~soa_hash_field->proc~soa_hash64_real_dp_field proc~soa_hash64_real_sp_field soa_hash64_real_sp_field interface~soa_hash_field->proc~soa_hash64_real_sp_field proc~soa_hash_int32_field soa_hash_int32_field interface~soa_hash_field->proc~soa_hash_int32_field proc~soa_hash_int64_field soa_hash_int64_field interface~soa_hash_field->proc~soa_hash_int64_field proc~soa_hash_logical_field soa_hash_logical_field interface~soa_hash_field->proc~soa_hash_logical_field proc~soa_hash_real_dp_field soa_hash_real_dp_field interface~soa_hash_field->proc~soa_hash_real_dp_field proc~soa_hash_real_sp_field soa_hash_real_sp_field interface~soa_hash_field->proc~soa_hash_real_sp_field none~update~2 array_hash64_t%update proc~soa_hash64_int32_field->none~update~2 proc~soa_hash64_int64_field->none~update~2 proc~soa_hash64_logical_field->none~update~2 proc~soa_hash64_real_dp_field->none~update~2 proc~soa_hash64_real_sp_field->none~update~2 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~soa_hash_begin_64->none~update~2 proc~array_hash64_reset array_hash64_t%array_hash64_reset proc~soa_hash_begin_64->proc~array_hash64_reset proc~soa_hash_int32_field->none~update proc~soa_hash_int64_field->none~update proc~soa_hash_logical_field->none~update proc~soa_hash_real_dp_field->none~update proc~soa_hash_real_sp_field->none~update 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~update64_cdp_0 array_hash64_t%update64_cdp_0 none~update~2->proc~update64_cdp_0 proc~update64_cdp_1 array_hash64_t%update64_cdp_1 none~update~2->proc~update64_cdp_1 proc~update64_cdp_2 array_hash64_t%update64_cdp_2 none~update~2->proc~update64_cdp_2 proc~update64_cdp_3 array_hash64_t%update64_cdp_3 none~update~2->proc~update64_cdp_3 proc~update64_char_0 array_hash64_t%update64_char_0 none~update~2->proc~update64_char_0 proc~update64_char_1 array_hash64_t%update64_char_1 none~update~2->proc~update64_char_1 proc~update64_csp_0 array_hash64_t%update64_csp_0 none~update~2->proc~update64_csp_0 proc~update64_csp_1 array_hash64_t%update64_csp_1 none~update~2->proc~update64_csp_1 proc~update64_csp_2 array_hash64_t%update64_csp_2 none~update~2->proc~update64_csp_2 proc~update64_csp_3 array_hash64_t%update64_csp_3 none~update~2->proc~update64_csp_3 proc~update64_int16_0 array_hash64_t%update64_int16_0 none~update~2->proc~update64_int16_0 proc~update64_int16_1 array_hash64_t%update64_int16_1 none~update~2->proc~update64_int16_1 proc~update64_int16_2 array_hash64_t%update64_int16_2 none~update~2->proc~update64_int16_2 proc~update64_int16_3 array_hash64_t%update64_int16_3 none~update~2->proc~update64_int16_3 proc~update64_int32_0 array_hash64_t%update64_int32_0 none~update~2->proc~update64_int32_0 proc~update64_int32_1 array_hash64_t%update64_int32_1 none~update~2->proc~update64_int32_1 proc~update64_int32_2 array_hash64_t%update64_int32_2 none~update~2->proc~update64_int32_2 proc~update64_int32_3 array_hash64_t%update64_int32_3 none~update~2->proc~update64_int32_3 proc~update64_int64_0 array_hash64_t%update64_int64_0 none~update~2->proc~update64_int64_0 proc~update64_int64_1 array_hash64_t%update64_int64_1 none~update~2->proc~update64_int64_1 proc~update64_int64_2 array_hash64_t%update64_int64_2 none~update~2->proc~update64_int64_2 proc~update64_int64_3 array_hash64_t%update64_int64_3 none~update~2->proc~update64_int64_3 proc~update64_int8_0 array_hash64_t%update64_int8_0 none~update~2->proc~update64_int8_0 proc~update64_int8_1 array_hash64_t%update64_int8_1 none~update~2->proc~update64_int8_1 proc~update64_int8_2 array_hash64_t%update64_int8_2 none~update~2->proc~update64_int8_2 proc~update64_int8_3 array_hash64_t%update64_int8_3 none~update~2->proc~update64_int8_3 proc~update64_logical_0 array_hash64_t%update64_logical_0 none~update~2->proc~update64_logical_0 proc~update64_logical_1 array_hash64_t%update64_logical_1 none~update~2->proc~update64_logical_1 proc~update64_logical_2 array_hash64_t%update64_logical_2 none~update~2->proc~update64_logical_2 proc~update64_logical_3 array_hash64_t%update64_logical_3 none~update~2->proc~update64_logical_3 proc~update64_rdp_0 array_hash64_t%update64_rdp_0 none~update~2->proc~update64_rdp_0 proc~update64_rdp_1 array_hash64_t%update64_rdp_1 none~update~2->proc~update64_rdp_1 proc~update64_rdp_2 array_hash64_t%update64_rdp_2 none~update~2->proc~update64_rdp_2 proc~update64_rdp_3 array_hash64_t%update64_rdp_3 none~update~2->proc~update64_rdp_3 proc~update64_rsp_0 array_hash64_t%update64_rsp_0 none~update~2->proc~update64_rsp_0 proc~update64_rsp_1 array_hash64_t%update64_rsp_1 none~update~2->proc~update64_rsp_1 proc~update64_rsp_2 array_hash64_t%update64_rsp_2 none~update~2->proc~update64_rsp_2 proc~update64_rsp_3 array_hash64_t%update64_rsp_3 none~update~2->proc~update64_rsp_3 proc~feed_real_dp64 feed_real_dp64 proc~update64_cdp_0->proc~feed_real_dp64 proc~update64_cdp_1->proc~feed_real_dp64 proc~update64_cdp_2->none~update~2 proc~update64_cdp_3->none~update~2 proc~feed_integer64 feed_integer64 proc~update64_char_0->proc~feed_integer64 proc~update64_char_1->none~update~2 proc~feed_real_sp64 feed_real_sp64 proc~update64_csp_0->proc~feed_real_sp64 proc~update64_csp_1->proc~feed_real_sp64 proc~update64_csp_2->none~update~2 proc~update64_csp_3->none~update~2 proc~update64_int16_0->proc~feed_integer64 proc~update64_int16_1->proc~feed_integer64 proc~update64_int16_2->none~update~2 proc~update64_int16_3->none~update~2 proc~update64_int32_0->proc~feed_integer64 proc~update64_int32_1->proc~feed_integer64 proc~update64_int32_2->none~update~2 proc~update64_int32_3->none~update~2 proc~update64_int64_0->proc~feed_integer64 proc~update64_int64_1->proc~feed_integer64 proc~update64_int64_2->none~update~2 proc~update64_int64_3->none~update~2 proc~update64_int8_0->proc~feed_integer64 proc~update64_int8_1->proc~feed_integer64 proc~update64_int8_2->none~update~2 proc~update64_int8_3->none~update~2 proc~feed_logical64 feed_logical64 proc~update64_logical_0->proc~feed_logical64 proc~update64_logical_1->proc~feed_logical64 proc~update64_logical_2->none~update~2 proc~update64_logical_3->none~update~2 proc~update64_rdp_0->proc~feed_real_dp64 proc~update64_rdp_1->proc~feed_real_dp64 proc~update64_rdp_2->none~update~2 proc~update64_rdp_3->none~update~2 proc~update64_rsp_0->proc~feed_real_sp64 proc~update64_rsp_1->proc~feed_real_sp64 proc~update64_rsp_2->none~update~2 proc~update64_rsp_3->none~update~2 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

Variables

Type Visibility Attributes Name Initial
type(array_hash64_t), private :: hasher
integer(kind=default_int), private :: n

Source Code

   function particle_soa_state_hash64(this) result(digest)
      !! 64-bit FNV-1a digest of the container's live state.
      !!
      !! Byte for byte the same stream as `state_hash`: the schema string, the
      !! element count as an explicit `int64`, then every field's live slice in
      !! declaration order. Only the digest width differs.
      !!
      !! Prefer this one when digests are used as identifiers rather than
      !! compared pairwise -- a determinism log keyed by digest, or
      !! deduplicating identical states. Among 10**5 distinct 32-bit digests
      !! the chance that some pair collides is about 69%; at 64 bits it is
      !! 3e-10.
      class(particle_soa_t), intent(in) :: this
         !! Container to fingerprint.
      integer(int64) :: digest

      type(array_hash64_t) :: hasher
      integer(default_int) :: n

      n = this%extent%used
      call soa_hash_begin(hasher, PARTICLE_SOA_SCHEMA, n)
      call soa_hash_field(hasher, this%id, n)
      call soa_hash_field(hasher, this%x, n)
      call soa_hash_field(hasher, this%y, n)
      call soa_hash_field(hasher, this%z, n)
      call soa_hash_field(hasher, this%mass, n)
      call soa_hash_field(hasher, this%active, n)
      digest = hasher%digest()
   end function particle_soa_state_hash64