|
Ptex
|
#include <PtexHashMap.h>
Classes | |
| class | Entry |
| struct | TableHeader |
Public Member Functions | |
| PtexHashMap () | |
| ~PtexHashMap () | |
| void | clear () |
| uint32_t | size () const |
| Value | get (Key &key) const |
| Value | tryInsert (Key &key, Value value, size_t &newMemUsed) |
| template<typename Fn > | |
| void | foreach (Fn &fn) const |
Private Member Functions | |
| PtexHashMap (const PtexHashMap &) | |
| void | operator= (const PtexHashMap &) |
| void | initContents () |
| void | deleteContents () |
| void * | allocTable (int32_t numEntries, size_t &memsize) |
| void | unlockTable (void *table) |
| void * | lockTableAndGrowIfNeeded (size_t &newMemUsed) |
| void * | grow (void *oldTable, size_t &newMemUsed) |
Static Private Member Functions | |
| static void | getTable (const void *table, const TableHeader *&header, const Entry *&entries) |
| static void | getTable (void *table, TableHeader *&header, Entry *&entries) |
Private Attributes | |
| void * | _table |
| Mutex | _lock |
| std::vector< void * > | _oldTables |
Definition at line 132 of file PtexHashMap.h.
|
private |
|
inline |
Definition at line 177 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::initContents().
|
inline |
Definition at line 182 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::deleteContents().
|
inlineprivate |
Definition at line 263 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::TableHeader::numEntries, and PtexHashMap< Key, Value >::TableHeader::size.
Referenced by PtexHashMap< Key, Value >::grow(), and PtexHashMap< Key, Value >::initContents().
|
inline |
Definition at line 187 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::deleteContents(), and PtexHashMap< Key, Value >::initContents().
Referenced by PtexReader::prune().
|
inlineprivate |
Definition at line 159 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::_oldTables, PtexHashMap< Key, Value >::_table, PtexHashMap< Key, Value >::getTable(), PtexHashMap< Key, Value >::Entry::key, PtexHashMap< Key, Value >::TableHeader::numEntries, and PtexHashMap< Key, Value >::Entry::value.
Referenced by PtexHashMap< Key, Value >::clear(), and PtexHashMap< Key, Value >::~PtexHashMap().
|
inline |
Definition at line 251 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::_table, PtexHashMap< Key, Value >::getTable(), PtexHashMap< Key, Value >::TableHeader::numEntries, and PtexHashMap< Key, Value >::Entry::value.
Referenced by PtexReaderCache::purgeAll().
|
inline |
Definition at line 197 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::_table, PtexHashMap< Key, Value >::getTable(), PtexHashMap< Key, Value >::Entry::key, PtexHashMap< Key, Value >::TableHeader::numEntries, and PtexHashMap< Key, Value >::Entry::value.
Referenced by PtexReaderCache::get(), PtexReader::getData(), and PtexReaderCache::purge().
|
inlinestaticprivate |
Definition at line 279 of file PtexHashMap.h.
Referenced by PtexHashMap< Key, Value >::deleteContents(), PtexHashMap< Key, Value >::foreach(), PtexHashMap< Key, Value >::get(), PtexHashMap< Key, Value >::grow(), PtexHashMap< Key, Value >::lockTableAndGrowIfNeeded(), and PtexHashMap< Key, Value >::tryInsert().
|
inlinestaticprivate |
Definition at line 285 of file PtexHashMap.h.
|
inlineprivate |
Definition at line 311 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::_oldTables, PtexHashMap< Key, Value >::allocTable(), PtexHashMap< Key, Value >::getTable(), PtexHashMap< Key, Value >::Entry::key, PtexHashMap< Key, Value >::TableHeader::numEntries, PtexHashMap< Key, Value >::TableHeader::size, and PtexHashMap< Key, Value >::Entry::value.
Referenced by PtexHashMap< Key, Value >::lockTableAndGrowIfNeeded().
|
inlineprivate |
Definition at line 153 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::_table, and PtexHashMap< Key, Value >::allocTable().
Referenced by PtexHashMap< Key, Value >::clear(), and PtexHashMap< Key, Value >::PtexHashMap().
|
inlineprivate |
Definition at line 297 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::_lock, PtexHashMap< Key, Value >::_table, PtexHashMap< Key, Value >::getTable(), PtexHashMap< Key, Value >::grow(), Mutex::lock(), PtexHashMap< Key, Value >::TableHeader::numEntries, and PtexHashMap< Key, Value >::TableHeader::size.
Referenced by PtexHashMap< Key, Value >::tryInsert().
|
private |
|
inline |
Definition at line 193 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::_table.
Referenced by PtexReaderCache::getStats().
|
inline |
Definition at line 220 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::getTable(), PtexHashMap< Key, Value >::Entry::key, PtexHashMap< Key, Value >::lockTableAndGrowIfNeeded(), PtexHashMap< Key, Value >::TableHeader::numEntries, PtexMemoryFence(), PtexHashMap< Key, Value >::TableHeader::size, PtexHashMap< Key, Value >::unlockTable(), and PtexHashMap< Key, Value >::Entry::value.
Referenced by PtexReaderCache::get(), and PtexReader::getData().
|
inlineprivate |
Definition at line 291 of file PtexHashMap.h.
References PtexHashMap< Key, Value >::_lock, PtexHashMap< Key, Value >::_table, and Mutex::unlock().
Referenced by PtexHashMap< Key, Value >::tryInsert().
|
private |
Definition at line 341 of file PtexHashMap.h.
Referenced by PtexHashMap< Key, Value >::lockTableAndGrowIfNeeded(), and PtexHashMap< Key, Value >::unlockTable().
|
private |
Definition at line 342 of file PtexHashMap.h.
Referenced by PtexHashMap< Key, Value >::deleteContents(), and PtexHashMap< Key, Value >::grow().
|
private |
Definition at line 340 of file PtexHashMap.h.
Referenced by PtexHashMap< Key, Value >::deleteContents(), PtexHashMap< Key, Value >::foreach(), PtexHashMap< Key, Value >::get(), PtexHashMap< Key, Value >::initContents(), PtexHashMap< Key, Value >::lockTableAndGrowIfNeeded(), PtexHashMap< Key, Value >::size(), and PtexHashMap< Key, Value >::unlockTable().