Blender V4.3
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,
c )
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:22
local_group_size(16, 16) .push_constant(Type b

Definition at line 23 of file BLI_hash.h.

◆ rot

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

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

Definition at line 22 of file BLI_hash.h.

Function Documentation

◆ BLI_hash_int()

◆ BLI_hash_int_01()

◆ BLI_hash_int_2d()

◆ BLI_hash_int_2d_to_float()

BLI_INLINE float BLI_hash_int_2d_to_float ( uint32_t kx,
uint32_t ky )

Definition at line 81 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 42 of file BLI_hash.h.

References b.

Referenced by BLI_hash_int_3d_to_float(), and blender::ed::sculpt_paint::greasepencil::hash_rng().

◆ 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 86 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 101 of file BLI_hash.h.

References b, BLI_hash_int(), hash, and ptr.

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

◆ BLI_hash_string()