Blender  V3.3
Macros | Functions
hash_mm3.c File Reference
#include "BLI_compiler_attrs.h"
#include "BLI_compiler_compat.h"
#include "BLI_hash_mm3.h"

Go to the source code of this file.

Macros

#define ROTL32(x, y)   rotl32(x, y)
 
#define BIG_CONSTANT(x)   (x##LLU)
 

Functions

static uint32_t rotl32 (uint32_t x, int8_t r)
 
BLI_INLINE uint32_t getblock32 (const uint32_t *p, int i)
 
BLI_INLINE uint64_t getblock64 (const uint64_t *p, int i)
 
BLI_INLINE uint32_t fmix32 (uint32_t h)
 
BLI_INLINE uint64_t fmix64 (uint64_t k)
 
uint32_t BLI_hash_mm3 (const unsigned char *data, size_t len, uint32_t seed)
 

Detailed Description

Functions to compute Murmur3 hash key.

This Code is based on alShaders/Cryptomatte/MurmurHash3.h:

MurmurHash3 was written by Austin Appleby, and is placed in the public domain. The author hereby disclaims copyright to this source code.

Definition in file hash_mm3.c.

Macro Definition Documentation

◆ BIG_CONSTANT

#define BIG_CONSTANT (   x)    (x##LLU)

Definition at line 31 of file hash_mm3.c.

◆ ROTL32

#define ROTL32 (   x,
  y 
)    rotl32(x, y)

Definition at line 30 of file hash_mm3.c.

Function Documentation

◆ BLI_hash_mm3()

uint32_t BLI_hash_mm3 ( const unsigned char *  data,
size_t  len,
uint32_t  seed 
)

◆ fmix32()

BLI_INLINE uint32_t fmix32 ( uint32_t  h)

Definition at line 50 of file hash_mm3.c.

Referenced by BLI_hash_mm3().

◆ fmix64()

BLI_INLINE uint64_t fmix64 ( uint64_t  k)

Definition at line 61 of file hash_mm3.c.

References BIG_CONSTANT.

◆ getblock32()

BLI_INLINE uint32_t getblock32 ( const uint32_t p,
int  i 
)

Definition at line 38 of file hash_mm3.c.

Referenced by BLI_hash_mm3().

◆ getblock64()

BLI_INLINE uint64_t getblock64 ( const uint64_t p,
int  i 
)

Definition at line 43 of file hash_mm3.c.

◆ rotl32()

static uint32_t rotl32 ( uint32_t  x,
int8_t  r 
)
inlinestatic

Definition at line 26 of file hash_mm3.c.

References r, and x.