Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
Halide::Runtime::Internal::THashMap< KeyType, ValueType > Struct Template Reference

#include <hashmap.h>

Inheritance diagram for Halide::Runtime::Internal::THashMap< KeyType, ValueType >:
Halide::Runtime::Internal::HashMap

Public Member Functions

bool init (void *user_context)
 
int lookup (void *user_context, const uint8_t *cache_key, int32_t key_size, ValueType *cache_value)
 
void store (void *user_context, const uint8_t *cache_key, int32_t key_size, const ValueType *cache_value)
 
- Public Member Functions inherited from Halide::Runtime::Internal::HashMap
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 Member Functions

static void copy_value_func (uint8_t *dst, const uint8_t *src, size_t size)
 
static void destroy_value_func (uint8_t *value, size_t size)
 

Additional Inherited Members

- Public Attributes inherited from Halide::Runtime::Internal::HashMap
halide_mutex memoization_lock
 
CacheEntrycache_entries [kHashTableSize]
 
CacheEntrymost_recently_used
 
CacheEntryleast_recently_used
 
uint64_t kDefaultCacheSize
 
int64_t max_cache_size
 
int64_t current_cache_size
 
copy_value_func copy_value
 
destroy_value_func destroy_value
 
void * user_context
 
bool inited
 
- Static Public Attributes inherited from Halide::Runtime::Internal::HashMap
static const size_t kHashTableSize = 256
 

Detailed Description

template<typename KeyType, typename ValueType>
struct Halide::Runtime::Internal::THashMap< KeyType, ValueType >

Definition at line 390 of file hashmap.h.

Member Function Documentation

◆ copy_value_func()

template<typename KeyType , typename ValueType >
static void Halide::Runtime::Internal::THashMap< KeyType, ValueType >::copy_value_func ( uint8_t * dst,
const uint8_t * src,
size_t size )
inlinestatic

Definition at line 397 of file hashmap.h.

References halide_debug_assert.

◆ destroy_value_func()

template<typename KeyType , typename ValueType >
static void Halide::Runtime::Internal::THashMap< KeyType, ValueType >::destroy_value_func ( uint8_t * value,
size_t size )
inlinestatic

Definition at line 404 of file hashmap.h.

References halide_debug_assert.

◆ init()

template<typename KeyType , typename ValueType >
bool Halide::Runtime::Internal::THashMap< KeyType, ValueType >::init ( void * user_context)
inline

◆ lookup()

template<typename KeyType , typename ValueType >
int Halide::Runtime::Internal::THashMap< KeyType, ValueType >::lookup ( void * user_context,
const uint8_t * cache_key,
int32_t key_size,
ValueType * cache_value )
inline

◆ store()

template<typename KeyType , typename ValueType >
void Halide::Runtime::Internal::THashMap< KeyType, ValueType >::store ( void * user_context,
const uint8_t * cache_key,
int32_t key_size,
const ValueType * cache_value )
inline

The documentation for this struct was generated from the following file: