37 static const unsigned int InitialFNV = 2166136261u;
38 static const unsigned int FNVMultiple = 16777619u;
41 unsigned int hash = InitialFNV;
46 hash = hash * FNVMultiple;
55 while( ! (ret = *(
const unsigned char *)src - *(
const unsigned char *)dst) && *dst)
108 unsigned int key =
m_uid;
110 key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
147 const bool VOID_IS_8 = ((
sizeof(
void*)==8));
151 key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
159template <
class Value>
182 unsigned int key =
m_uid;
184 key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
192template <
class Value>
214 unsigned int key =
m_uid;
216 key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
224template <
class Key,
class Value>
245 m_next.resize(newCapacity);
249 for (i= 0; i < newCapacity; ++i)
253 for (i = 0; i < newCapacity; ++i)
258 for(i=0;i<curHashtableSize;i++)
274 void insert(
const Key& key,
const Value& value) {
291 if (oldCapacity < newCapacity)
317 while (index != pairIndex)
340 if (lastPairIndex == pairIndex)
354 while (index != lastPairIndex)
434 const Value*
find(
const Key& key)
const
457 unsigned int hash = key.getHash() & (
m_valueArray.capacity()-1);
#define SIMD_FORCE_INLINE
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
unsigned int getHash() const
bool equals(const btHashInt &other) const
bool equals(const btHashKeyPtr< Value > &other) const
unsigned int getHash() const
unsigned int getHash() const
bool equals(const btHashKey< Value > &other) const
The btHashMap template class implements a generic and lightweight hashmap.
void insert(const Key &key, const Value &value)
Key getKeyAtIndex(int index)
void growTables(const Key &)
Value * operator[](const Key &key)
int findIndex(const Key &key) const
const Key getKeyAtIndex(int index) const
Value * find(const Key &key)
void remove(const Key &key)
btAlignedObjectArray< int > m_hashTable
btAlignedObjectArray< int > m_next
const Value * getAtIndex(int index) const
btAlignedObjectArray< Key > m_keyArray
btAlignedObjectArray< Value > m_valueArray
const Value * find(const Key &key) const
Value * getAtIndex(int index)
const Value * operator[](const Key &key) const
const void * getPointer() const
btHashPtr(const void *ptr)
bool equals(const btHashPtr &other) const
unsigned int getHash() const
unsigned int m_hashValues[2]
very basic hashable string implementation, compatible with btHashMap
bool equals(const btHashString &other) const
int portableStringCompare(const char *src, const char *dst) const
unsigned int getHash() const
btHashString(const char *name)