Blender  V3.3
Macros | Functions
BLI_hash.h File Reference
#include "BLI_utildefines.h"

Go to the source code of this file.

Macros

#define rot(x, k)   (((x) << (k)) | ((x) >> (32 - (k))))
 
#define final(a, b, c)
 

Functions

BLI_INLINE unsigned int BLI_hash_int_3d (unsigned int kx, unsigned int ky, unsigned int kz)
 
BLI_INLINE unsigned int BLI_hash_int_2d (unsigned int kx, unsigned int ky)
 
BLI_INLINE unsigned int BLI_hash_string (const char *str)
 
BLI_INLINE float BLI_hash_int_2d_to_float (uint32_t kx, uint32_t ky)
 
BLI_INLINE float BLI_hash_int_3d_to_float (uint32_t kx, uint32_t ky, uint32_t kz)
 
BLI_INLINE unsigned int BLI_hash_int (unsigned int k)
 
BLI_INLINE float BLI_hash_int_01 (unsigned int k)
 
BLI_INLINE void BLI_hash_pointer_to_color (const void *ptr, int *r, int *g, int *b)
 

Macro Definition Documentation

◆ final

#define final (   a,
  b,
 
)
Value:
{ \
c ^= b; \
c -= rot(b, 14); \
a ^= c; \
a -= rot(c, 11); \
b ^= a; \
b -= rot(a, 25); \
c ^= b; \
c -= rot(b, 16); \
a ^= c; \
a -= rot(c, 4); \
b ^= a; \
b -= rot(a, 14); \
c ^= b; \
c -= rot(b, 24); \
} \
((void)0)
#define rot(x, k)
Definition: BLI_hash.h:20
SyclQueue void void size_t num_bytes void
static unsigned c
Definition: RandGen.cpp:83
static unsigned a[3]
Definition: RandGen.cpp:78
static const pxr::TfToken b("b", pxr::TfToken::Immortal)

Definition at line 21 of file BLI_hash.h.

◆ rot

#define rot (   x,
 
)    (((x) << (k)) | ((x) >> (32 - (k))))

Jenkins Lookup3 Hash Functions. Source: http://burtleburtle.net/bob/c/lookup3.c

Definition at line 20 of file BLI_hash.h.

Function Documentation

◆ BLI_hash_int()

BLI_INLINE unsigned int BLI_hash_int ( unsigned int  k)

◆ BLI_hash_int_01()

BLI_INLINE float BLI_hash_int_01 ( unsigned int  k)

◆ BLI_hash_int_2d()

BLI_INLINE unsigned int BLI_hash_int_2d ( unsigned int  kx,
unsigned int  ky 
)

◆ BLI_hash_int_2d_to_float()

BLI_INLINE float BLI_hash_int_2d_to_float ( uint32_t  kx,
uint32_t  ky 
)

Definition at line 79 of file BLI_hash.h.

References BLI_hash_int_2d(), and float().

◆ BLI_hash_int_3d()

BLI_INLINE unsigned int BLI_hash_int_3d ( unsigned int  kx,
unsigned int  ky,
unsigned int  kz 
)

Definition at line 40 of file BLI_hash.h.

References Freestyle::a, usdtokens::b(), and Freestyle::c.

Referenced by BLI_hash_int_3d_to_float().

◆ BLI_hash_int_3d_to_float()

BLI_INLINE float BLI_hash_int_3d_to_float ( uint32_t  kx,
uint32_t  ky,
uint32_t  kz 
)

Definition at line 84 of file BLI_hash.h.

References BLI_hash_int_3d(), and float().

◆ BLI_hash_pointer_to_color()

BLI_INLINE void BLI_hash_pointer_to_color ( const void ptr,
int *  r,
int *  g,
int *  b 
)

Definition at line 99 of file BLI_hash.h.

References usdtokens::b(), BLI_hash_int(), usdtokens::g(), hash, ptr, and r.

Referenced by blender::deg::color_for_pointer().

◆ BLI_hash_string()

BLI_INLINE unsigned int BLI_hash_string ( const char *  str)