39 size_t y = size_t(key);
73 return (memcmp(a,
b,
sizeof(
uint[4])) != 0);
99 return uint(key & 0xffffffff);
121 return hash_a ^ (hash_b + 0x9e3779b9 + (hash_a << 6) + (hash_a >> 2));
126 const signed char *p;
129 for (p =
reinterpret_cast<const signed char *
>(key); n-- && *p !=
'\0'; p++) {
130 h = ((h << 5) + h) +
uint(*p);
137 const signed char *p;
140 for (p =
static_cast<const signed char *
>(ptr); *p !=
'\0'; p++) {
141 h = ((h << 5) + h) +
uint(*p);
148 const uchar *key =
static_cast<const uchar *
>(ptr);
150 return BLI_hash_mm2(key, strlen(
reinterpret_cast<const char *
>(key)) + 1, 0);
154 return (a ==
b) ?
false : !
STREQ(
static_cast<const char *
>(a),
static_cast<const char *
>(
b));
177 return ((
A->first !=
B->first) || (
A->second !=
B->second));
182 MEM_delete(
static_cast<const GHashPair *
>(ptr));
Read Blender memory allocation and freeing.
#define POINTER_AS_UINT(i)
void * MEM_new_uninitialized(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
unsigned int BLI_ghashutil_uinthash(unsigned int key)
GHash * BLI_ghash_int_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_new_ex(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_str_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghashutil_strhash_n(const char *key, size_t n)
GHash * BLI_ghash_ptr_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GSet * BLI_gset_pair_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghashutil_ptrhash(const void *key)
void BLI_ghashutil_pairfree(void *ptr)
unsigned int BLI_ghashutil_strhash_p_murmur(const void *ptr)
GSet * BLI_gset_pair_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghashutil_uinthash_v4_cmp(const void *a, const void *b)
bool BLI_ghashutil_paircmp(const void *a, const void *b)
GSet * BLI_gset_str_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GSet * BLI_gset_ptr_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GHashPair * BLI_ghashutil_pairalloc(const void *first, const void *second)
uint32_t BLI_hash_mm2(const unsigned char *data, size_t len, uint32_t seed)
bool BLI_ghashutil_intcmp(const void *a, const void *b)
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghashutil_inthash_p_murmur(const void *ptr)
GHash * BLI_ghash_str_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghashutil_uinthash_v4_murmur(const unsigned int key[4])
GSet * BLI_gset_int_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
_W64 unsigned int uintptr_t
GSet * BLI_gset_ptr_new(const char *info)
GHash * BLI_ghash_pair_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghashutil_inthash_p_simple(const void *ptr)
unsigned int BLI_ghashutil_pairhash(const void *ptr)
size_t BLI_ghashutil_combine_hash(size_t hash_a, size_t hash_b)
unsigned int BLI_ghashutil_strhash_p(const void *ptr)
GSet * BLI_gset_str_new(const char *info)
GSet * BLI_gset_new_ex(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghashutil_inthash_p(const void *ptr)
GHash * BLI_ghash_int_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghashutil_ptrcmp(const void *a, const void *b)
GSet * BLI_gset_int_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghashutil_uinthash_v4(const unsigned int key[4])
GHash * BLI_ghash_pair_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghashutil_strcmp(const void *a, const void *b)