mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Support 128bit seed for MurmurHash3_x64_128
This commit is contained in:
parent
d04d4ab499
commit
86bf9d5b8d
2 changed files with 4 additions and 4 deletions
6
extern/smhasher/MurmurHash3.cpp
vendored
6
extern/smhasher/MurmurHash3.cpp
vendored
|
@ -66,13 +66,13 @@ FORCE_INLINE uint64_t fmix64 ( uint64_t k )
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void MurmurHash3_x64_128 ( const void * key, const int len,
|
void MurmurHash3_x64_128 ( const void * key, const int len,
|
||||||
const uint32_t seed, void * out )
|
const uint64_t * seed, void * out )
|
||||||
{
|
{
|
||||||
const uint8_t * data = (const uint8_t*)key;
|
const uint8_t * data = (const uint8_t*)key;
|
||||||
const int nblocks = len / 16;
|
const int nblocks = len / 16;
|
||||||
|
|
||||||
uint64_t h1 = seed;
|
uint64_t h1 = seed[0];
|
||||||
uint64_t h2 = seed;
|
uint64_t h2 = seed[1];
|
||||||
|
|
||||||
const uint64_t c1 = BIG_CONSTANT(0x87c37b91114253d5);
|
const uint64_t c1 = BIG_CONSTANT(0x87c37b91114253d5);
|
||||||
const uint64_t c2 = BIG_CONSTANT(0x4cf5ad432745937f);
|
const uint64_t c2 = BIG_CONSTANT(0x4cf5ad432745937f);
|
||||||
|
|
2
extern/smhasher/MurmurHash3.h
vendored
2
extern/smhasher/MurmurHash3.h
vendored
|
@ -26,7 +26,7 @@ typedef unsigned __int64 uint64_t;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void MurmurHash3_x64_128 ( const void * key, int len, uint32_t seed, void * out );
|
void MurmurHash3_x64_128 ( const void * key, int len, const uint64_t * seed, void * out );
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue