1
0
Fork 0
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:
elsid 2021-11-15 14:50:04 +01:00
parent d04d4ab499
commit 86bf9d5b8d
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40
2 changed files with 4 additions and 4 deletions

View file

@ -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);

View file

@ -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 );
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------