Tpetra parallel linear algebra
Version of the Day
|
Specialization for ResultType = int. More...
#include <Tpetra_Details_Hash.hpp>
Public Types | |
typedef KeyType | argument_type |
Type of the hash function's input. More... | |
typedef int | 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 &key, const offset_type &size) |
The hash function. More... | |
static result_type | getRecommendedSize (const offset_type size) |
Number of "buckets" that the constructor of FixedHashTable should allocate. More... | |
Specialization for ResultType = int.
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. |
This hash function currently always returns int
, no matter the value type. This is unfortunate, because it limits Tpetra to have LocalOrdinal = int
(or smaller). I would like to fix this at some point. Tpetra provides this partial specialization as a hook for fixing this later.
Definition at line 98 of file Tpetra_Details_Hash.hpp.
typedef KeyType Tpetra::Details::Hash< KeyType, DeviceType, OffsetType, int >::argument_type |
Type of the hash function's input.
This is the same typedef as found in std::hash.
Definition at line 102 of file Tpetra_Details_Hash.hpp.
typedef int Tpetra::Details::Hash< KeyType, DeviceType, OffsetType, int >::result_type |
Type of the return value of the hash function.
This is the same typedef as found in std::hash.
Definition at line 107 of file Tpetra_Details_Hash.hpp.
typedef OffsetType Tpetra::Details::Hash< KeyType, DeviceType, OffsetType, int >::offset_type |
Type of offsets into the hash table's array of (key,value) pairs.
Definition at line 110 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 119 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.) |
Definition at line 144 of file Tpetra_Details_Hash.hpp.