MCPcopy Create free account
hub / github.com/defold/defold / dmHashInit32

Function dmHashInit32

engine/dlib/src/dlib/hash.cpp:341–350  ·  view source on GitHub ↗

Based on CMurmurHash2A

Source from the content-addressed store, hash-verified

339
340// Based on CMurmurHash2A
341void dmHashInit32(HashState32* hash_state, bool reverse_hash)
342{
343 memset(hash_state, 0x0, sizeof(HashState32));
344 if(reverse_hash && dmHashContainer().m_Enabled)
345 {
346 DM_MUTEX_SCOPED_LOCK(dmHashContainer().m_Mutex);
347 uint32_t new_index = hash_state->m_ReverseHashEntryIndex = dmHashContainer().AllocReverseHashStatesSlot();
348 memset(&dmHashContainer().m_HashStates[new_index], 0x0, sizeof(ReverseHashEntry));
349 }
350}
351
352void dmHashClone32(HashState32* hash_state, const HashState32* source_hash_state, bool reverse_hash)
353{

Callers 15

ReHashEmitterFunction · 0.85
TEST_FFunction · 0.85
dmHashCTestIncrementalFunction · 0.85
TEST_FFunction · 0.85
CalcBufferVersionFunction · 0.85
ReHashFunction · 0.85
ReHashFunction · 0.85
HashConstantFunction · 0.85
GetRenderConstantsHashFunction · 0.85
ReHashFunction · 0.85
AnimationReHashFunction · 0.85

Calls 1

Tested by 5

TEST_FFunction · 0.68
dmHashCTestIncrementalFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68