Open CASCADE Technology  7.8.1
Functions
opencascade::MurmurHash Namespace Reference

Implementation of Murmur hash with autodetect of sizeof(size_t). More...

Functions

uint32_t MurmurHash2A (const void *theKey, int theLen, uint32_t theSeed)
 
uint64_t MurmurHash64A (const void *theKey, int theLen, uint64_t theSeed)
 
template<typename T1 , typename T = size_t>
std::enable_if< sizeof(T)==8, uint64_t >::type hash_combine (const T1 &theValue, const int theLen=sizeof(T1), const T theSeed=0xA329F1D3A586ULL)
 
template<typename T1 , typename T = size_t>
std::enable_if< sizeof(T)!=8, T >::type hash_combine (const T1 &theValue, const int theLen=sizeof(T1), const T theSeed=0xc70f6907U)
 
template<typename T = size_t>
constexpr T optimalSeed ()
 

Detailed Description

Implementation of Murmur hash with autodetect of sizeof(size_t).

The default value for the seed is optimal for general cases at a certain hash size.

Function Documentation

template<typename T1 , typename T = size_t>
std::enable_if<sizeof(T) == 8, uint64_t>::type opencascade::MurmurHash::hash_combine ( const T1 &  theValue,
const int  theLen = sizeof(T1),
const T  theSeed = 0xA329F1D3A586ULL 
)
template<typename T1 , typename T = size_t>
std::enable_if<sizeof(T) != 8, T>::type opencascade::MurmurHash::hash_combine ( const T1 &  theValue,
const int  theLen = sizeof(T1),
const T  theSeed = 0xc70f6907U 
)
uint32_t opencascade::MurmurHash::MurmurHash2A ( const void theKey,
int  theLen,
uint32_t  theSeed 
)
uint64_t opencascade::MurmurHash::MurmurHash64A ( const void theKey,
int  theLen,
uint64_t  theSeed 
)
template<typename T = size_t>
constexpr T opencascade::MurmurHash::optimalSeed ( )