| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(shared_rhash_t), | private | :: | shared_ht |
| procedure , public , :: hash_function Function | |
| procedure , public , :: alloc Subroutine | |
| procedure , public , :: dealloc Subroutine | |
| procedure , public , :: count_index Subroutine | |
| procedure , public , :: add_index Subroutine | |
| procedure , public , :: finalize_setup Subroutine | |
| procedure , public , :: setup_offsets Subroutine | |
| procedure , public , :: lookup Subroutine | |
| procedure , public , :: known_conflicts Function | |
| procedure , public , :: sync Subroutine |
Get the hash value for an arbitrary input value @param index input value to get the hash value for
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(index_rhash_t), | intent(in) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | index |
During initialisation, we can only start writing values once the offsets are known. This requires knowledge about the number of conflicts per hash value. This function tells us whether the conflicts have already been counted. @return t_kc true if and only if the conflicts have already been counted.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(index_rhash_t), | intent(in) | :: | this |
Allocate the internal (shared) memory @param[in] n_elem number of distinct values to store @param[in] htsize range of the hash function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(index_rhash_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | n_elem | |||
| integer(kind=int64), | intent(in) | :: | htsize |
Deallocate all arrays associated with this hash table object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(index_rhash_t), | intent(inout) | :: | this |
Log the occurence of this index in the set of indices to be stored Does not add it, only updates the offsets @param[in] index index value to be logged
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(index_rhash_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | index |
For performance reasons, we cannot directly calculate the offsets, but instead first count the number of conflicts per hash value. Then, we sum these up cumulatively Directly counting the offsets is horrifically slow
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(index_rhash_t), | intent(inout) | :: | this |
Add an input value to the stored values, assuming we already know the offsets @param[in] index value to be stored @param[out] pos on return, the position where this value was stored
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(index_rhash_t), | intent(inout) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | index | |||
| integer(kind=int64), | intent(out) | :: | pos |
Dealloates temporary arrays used for initialisation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(index_rhash_t) | :: | this |
Look up a value in this hash table. Returns whether the value is stored and if yes, where @param[in] index value to be looked up @param[out] pos on return, the position of index if found, else 0 @param[out] t_found on return, true if and only if index was found
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(index_rhash_t), | intent(in) | :: | this | |||
| integer(kind=int64), | intent(in) | :: | index | |||
| integer(kind=int64), | intent(out) | :: | pos | |||
| logical, | intent(out) | :: | t_found |
For a MPI-3 shared memory array, synchronization is required after/before each read/write epoch
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(index_rhash_t), | intent(in) | :: | this |