Go to the documentation of this file.
18 #ifndef OPAL_HASH_STRING_H
19 #define OPAL_HASH_STRING_H
28 #define OPAL_HASH_STRLEN( str, hash, length ) \
30 register const char *_str = (str); \
31 register uint32_t _hash = 0; \
32 register uint32_t _len = 0; \
37 _hash += (_hash << 10); \
38 _hash ^= (_hash >> 6); \
41 _hash += (_hash << 3); \
42 _hash ^= (_hash >> 11); \
43 (hash) = (_hash + (_hash << 15)); \
53 #define OPAL_HASH_STR( str, hash ) \
55 register const char *_str = (str); \
56 register uint32_t _hash = 0; \
60 _hash += (_hash << 10); \
61 _hash ^= (_hash >> 6); \
64 _hash += (_hash << 3); \
65 _hash ^= (_hash >> 11); \
66 (hash) = (_hash + (_hash << 15)); \