KiCad PCB EDA Suite
Loading...
Searching...
No Matches
MMH3_HASH Class Reference

A streaming C++ equivalent for MurmurHash3_x64_128. More...

#include <mmh3_hash.h>

Public Member Functions

 MMH3_HASH ()
 
 MMH3_HASH (uint32_t aSeed=0)
 
FORCE_INLINE void reset (uint32_t aSeed=0)
 
FORCE_INLINE void add (int32_t input)
 
FORCE_INLINE HASH_128 digest ()
 

Private Member Functions

FORCE_INLINE uint64_t getblock64 (int i)
 
FORCE_INLINE void hashBlock ()
 
FORCE_INLINE void hashTail ()
 
FORCE_INLINE void hashFinal (HASH_128 &out)
 

Static Private Member Functions

static FORCE_INLINE uint64_t fmix64 (uint64_t k)
 

Private Attributes

uint64_t h1
 
uint64_t h2
 
union {
   uint32_t   blocks [4]
 
   uint64_t   blocks64 [2]
 
}; 
 
uint32_t len
 

Detailed Description

A streaming C++ equivalent for MurmurHash3_x64_128.

Definition at line 59 of file mmh3_hash.h.

Constructor & Destructor Documentation

◆ MMH3_HASH() [1/2]

MMH3_HASH::MMH3_HASH ( )
inline

Definition at line 62 of file mmh3_hash.h.

References reset().

◆ MMH3_HASH() [2/2]

MMH3_HASH::MMH3_HASH ( uint32_t  aSeed = 0)
inline

Definition at line 64 of file mmh3_hash.h.

References reset().

Member Function Documentation

◆ add()

FORCE_INLINE void MMH3_HASH::add ( int32_t  input)
inline

Definition at line 73 of file mmh3_hash.h.

References blocks, hashBlock(), and len.

Referenced by BOOST_AUTO_TEST_CASE(), and SHAPE_POLY_SET::checksum().

◆ digest()

FORCE_INLINE HASH_128 MMH3_HASH::digest ( )
inline

Definition at line 82 of file mmh3_hash.h.

References hashFinal(), and hashTail().

Referenced by BOOST_AUTO_TEST_CASE(), and SHAPE_POLY_SET::checksum().

◆ fmix64()

static FORCE_INLINE uint64_t MMH3_HASH::fmix64 ( uint64_t  k)
inlinestaticprivate

Definition at line 153 of file mmh3_hash.h.

References BIG_CONSTANT.

Referenced by hashFinal().

◆ getblock64()

FORCE_INLINE uint64_t MMH3_HASH::getblock64 ( int  i)
inlineprivate

Definition at line 96 of file mmh3_hash.h.

References blocks64.

Referenced by hashBlock().

◆ hashBlock()

FORCE_INLINE void MMH3_HASH::hashBlock ( )
inlineprivate

Definition at line 101 of file mmh3_hash.h.

References BIG_CONSTANT, getblock64(), h1, h2, and ROTL64.

Referenced by add().

◆ hashFinal()

FORCE_INLINE void MMH3_HASH::hashFinal ( HASH_128 out)
inlineprivate

Definition at line 164 of file mmh3_hash.h.

References fmix64(), h1, h2, len, and HASH_128::Value64.

Referenced by digest().

◆ hashTail()

FORCE_INLINE void MMH3_HASH::hashTail ( )
inlineprivate

Definition at line 118 of file mmh3_hash.h.

References BIG_CONSTANT, blocks, h1, h2, len, and ROTL64.

Referenced by digest().

◆ reset()

FORCE_INLINE void MMH3_HASH::reset ( uint32_t  aSeed = 0)
inline

Definition at line 66 of file mmh3_hash.h.

References h1, h2, and len.

Referenced by MMH3_HASH().

Member Data Documentation

◆ 

union { ... } MMH3_HASH::@41

◆ blocks

uint32_t MMH3_HASH::blocks[4]

Definition at line 187 of file mmh3_hash.h.

Referenced by add(), and hashTail().

◆ blocks64

uint64_t MMH3_HASH::blocks64[2]

Definition at line 188 of file mmh3_hash.h.

Referenced by getblock64().

◆ h1

uint64_t MMH3_HASH::h1
private

Definition at line 183 of file mmh3_hash.h.

Referenced by hashBlock(), hashFinal(), hashTail(), and reset().

◆ h2

uint64_t MMH3_HASH::h2
private

Definition at line 184 of file mmh3_hash.h.

Referenced by hashBlock(), hashFinal(), hashTail(), and reset().

◆ len

uint32_t MMH3_HASH::len
private

Definition at line 190 of file mmh3_hash.h.

Referenced by add(), hashFinal(), hashTail(), and reset().


The documentation for this class was generated from the following file: