#include <evo/impl/container.h>
template<class T, class H = SpookyHash, bool B = IsPodType<T>::value>
struct evo::DataHash< T, H, B >
Optimized data hash helpers.
- Operations are specialized and optimized for POD types
- This is used by Evo items and containers
- Template Parameters
-
T | Data type to use |
H | Hashing class to use for POD data, ignored with non-POD types |
B | Inferred from T |
|
static ulong | hash (const T *data, ulong size, ulong seed=0) |
| Compute hash value from data. More...
|
|
static ulong | hash (const T &data, ulong seed=0) |
| Compute hash value from data. More...
|
|
◆ HashType
◆ Item
Item type (const removed)
◆ hash() [1/2]
static ulong hash |
( |
const T * |
data, |
|
|
ulong |
size, |
|
|
ulong |
seed = 0 |
|
) |
| |
|
inlinestatic |
Compute hash value from data.
- This uses T::hash() method to chain-hash each item, for POD types this uses
H::hash()
on the whole array
- Parameters
-
data | Data to use |
size | Data size as item count |
seed | Seed value for chaining from a previous hash, 0 if none |
- Returns
- Hash value
◆ hash() [2/2]
static ulong hash |
( |
const T & |
data, |
|
|
ulong |
seed = 0 |
|
) |
| |
|
inlinestatic |
Compute hash value from data.
- This uses T::hash() method, for POD types this uses
H::hash()
- Parameters
-
data | Data to use |
seed | Seed value for chaining from a previous hash, 0 if none |
- Returns
- Hash value
The documentation for this struct was generated from the following file: