Halide
|
#include <hashmap.h>
Inherited by Halide::Runtime::Internal::THashMap< KeyType, ValueType >.
Public Member Functions | |
bool | init (void *user_context, copy_value_func copy_value, destroy_value_func destroy_value) |
void | prune () |
void | set_size (int64_t size) |
int | lookup (void *user_context, const uint8_t *cache_key, int32_t size, uint8_t *cache_value, size_t cache_value_size) |
void | store (void *user_context, const uint8_t *cache_key, int32_t size, const uint8_t *cache_value, size_t cache_value_size) |
void | release (void *user_context, void *host) |
void | cleanup () |
Static Public Attributes | |
static const size_t | kHashTableSize = 256 |
|
inline |
Definition at line 150 of file hashmap.h.
Referenced by Halide::Runtime::Internal::THashMap< KeyType, ValueType >::init().
|
inline |
Definition at line 170 of file hashmap.h.
References cache_entries, current_cache_size, Halide::Runtime::Internal::CacheEntry::destroy(), destroy_value, halide_debug_assert, Halide::Runtime::Internal::CacheEntry::hash, hashmap_free, Halide::Runtime::Internal::CacheEntry::in_use_count, kHashTableSize, least_recently_used, Halide::Runtime::Internal::CacheEntry::less_recent, max_cache_size, Halide::Runtime::Internal::CacheEntry::more_recent, most_recently_used, Halide::Runtime::Internal::CacheEntry::next, user_context, and Halide::Runtime::Internal::CacheEntry::value_size.
Referenced by set_size().
|
inline |
Definition at line 226 of file hashmap.h.
References kDefaultCacheSize, max_cache_size, memoization_lock, and prune().
|
inline |
Definition at line 237 of file hashmap.h.
Referenced by Halide::Runtime::Internal::THashMap< KeyType, ValueType >::lookup().
|
inline |
Definition at line 299 of file hashmap.h.
Referenced by Halide::Runtime::Internal::THashMap< KeyType, ValueType >::store().
|
inline |
|
inline |
Definition at line 371 of file hashmap.h.
References cache_entries, current_cache_size, Halide::Runtime::Internal::CacheEntry::destroy(), destroy_value, hashmap_free, least_recently_used, most_recently_used, Halide::Runtime::Internal::CacheEntry::next, and user_context.
halide_mutex Halide::Runtime::Internal::HashMap::memoization_lock |
Definition at line 121 of file hashmap.h.
Referenced by set_size().
|
static |
CacheEntry* Halide::Runtime::Internal::HashMap::cache_entries[kHashTableSize] |
CacheEntry* Halide::Runtime::Internal::HashMap::most_recently_used |
CacheEntry* Halide::Runtime::Internal::HashMap::least_recently_used |
uint64_t Halide::Runtime::Internal::HashMap::kDefaultCacheSize |
Definition at line 130 of file hashmap.h.
Referenced by set_size().
int64_t Halide::Runtime::Internal::HashMap::max_cache_size |
Definition at line 131 of file hashmap.h.
Referenced by prune(), and set_size().
int64_t Halide::Runtime::Internal::HashMap::current_cache_size |
copy_value_func Halide::Runtime::Internal::HashMap::copy_value |
destroy_value_func Halide::Runtime::Internal::HashMap::destroy_value |
void* Halide::Runtime::Internal::HashMap::user_context |
Definition at line 137 of file hashmap.h.
Referenced by cleanup(), Halide::Runtime::Internal::THashMap< KeyType, ValueType >::init(), Halide::Runtime::Internal::THashMap< KeyType, ValueType >::lookup(), prune(), and Halide::Runtime::Internal::THashMap< KeyType, ValueType >::store().