親の乱数 id と子の番号から、衝突しにくい 63 bit の子 id を作る(二次電子などの派生粒子用)。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i64), | intent(in) | :: | parent_id | |||
| integer(kind=i64), | intent(in) | :: | ordinal |
pure integer(i64) function counter_child_id(parent_id, ordinal) result(child_id) integer(i64), intent(in) :: parent_id, ordinal integer(i64) :: hi, lo hi = murmur3_tuple(lane_seed(1), parent_id, [ordinal, 4099_i64]) lo = murmur3_tuple(lane_seed(2), parent_id, [ordinal, 4099_i64]) child_id = iand(ior(ishft(hi, 32), lo), huge(0_i64)) end function counter_child_id