Open CASCADE Technology 7.9.0
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

◆ hash_combine() [1/2]

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 )

◆ hash_combine() [2/2]

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 )

◆ MurmurHash2A()

uint32_t opencascade::MurmurHash::MurmurHash2A ( const void * theKey,
int theLen,
uint32_t theSeed )

◆ MurmurHash64A()

uint64_t opencascade::MurmurHash::MurmurHash64A ( const void * theKey,
int theLen,
uint64_t theSeed )

◆ optimalSeed()

template<typename T = size_t>
T opencascade::MurmurHash::optimalSeed ( )
constexpr