Tpetra parallel linear algebra
Version of the Day
|
The hash function for FixedHashTable. More...
#include <Tpetra_Details_Hash.hpp>
Public Types | |
typedef KeyType | argument_type |
Type of the hash function's input. More... | |
typedef ResultType | result_type |
Type of the return value of the hash function. More... | |
typedef OffsetType | offset_type |
Type of offsets into the hash table's array of (key,value) pairs. More... | |
Static Public Member Functions | |
static KOKKOS_INLINE_FUNCTION result_type | hashFunc (const argument_type &, const offset_type &) |
The hash function. More... | |
static result_type | getRecommendedSize (const offset_type) |
Number of "buckets" that the constructor of FixedHashTable should allocate. More... | |
The hash function for FixedHashTable.
KeyType | The type of hash function inputs. Corresponds to Tpetra's GlobalOrdinal type. |
DeviceType | Kokkos::Device specialization. |
OffsetType | Type of each entry of the "buckets" (offsets) array ptr_ in FixedHashTable. |
ResultType | Type of the return value of the hash function. |
Definition at line 41 of file Tpetra_Details_Hash.hpp.
typedef KeyType Tpetra::Details::Hash< KeyType, DeviceType, OffsetType, ResultType >::argument_type |
Type of the hash function's input.
This is the same typedef as found in std::hash.
Definition at line 45 of file Tpetra_Details_Hash.hpp.
typedef ResultType Tpetra::Details::Hash< KeyType, DeviceType, OffsetType, ResultType >::result_type |
Type of the return value of the hash function.
This is the same typedef as found in std::hash.
Definition at line 50 of file Tpetra_Details_Hash.hpp.
typedef OffsetType Tpetra::Details::Hash< KeyType, DeviceType, OffsetType, ResultType >::offset_type |
Type of offsets into the hash table's array of (key,value) pairs.
Definition at line 53 of file Tpetra_Details_Hash.hpp.
|
inlinestatic |
The hash function.
key | [in] The key to hash. |
size | [in] Number of "buckets" in the hash table. |
It is legal to call this function in a Kokkos parallel kernel.
Definition at line 62 of file Tpetra_Details_Hash.hpp.
|
inlinestatic |
Number of "buckets" that the constructor of FixedHashTable should allocate.
size | [in] Number of entries in the table. (FixedHashTable fixes the number of entries in its constructor.) |
This is included in Hash, because a correct and efficient implementation is a function of result_type. The point is to factor out all of the non-generic stuff into this Hash struct, which can be specialized for the types of interest.
Definition at line 78 of file Tpetra_Details_Hash.hpp.