Halide 22.0.0 Halide compiler and libraries

Public Member Functions | Static Public Member Functions | List of all members
Halide::Runtime::Internal::THashMap< KeyType, ValueType > Struct Template Reference

`#include <hashmap.h>`

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

## 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
CacheEntry * | cache_entries [kHashTableSize]
CacheEntry * | most_recently_used
CacheEntry * | least_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.

Referenced by Halide::Runtime::Internal::THashMap< KeyType, ValueType >::init().

## ◆ 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.

Referenced by Halide::Runtime::Internal::THashMap< KeyType, ValueType >::init().

## ◆ init()

template<typename KeyType , typename ValueType >

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

Definition at line 410 of file hashmap.h.

References Halide::Runtime::Internal::THashMap< KeyType, ValueType >::copy_value_func(), Halide::Runtime::Internal::THashMap< KeyType, ValueType >::destroy_value_func(), Halide::Runtime::Internal::HashMap::init(), and Halide::Runtime::Internal::HashMap::user_context.

## ◆ 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

Definition at line 414 of file hashmap.h.

References Halide::Runtime::Internal::HashMap::lookup(), and Halide::Runtime::Internal::HashMap::user_context.

## ◆ 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

Definition at line 418 of file hashmap.h.

References Halide::Runtime::Internal::HashMap::store(), and Halide::Runtime::Internal::HashMap::user_context.

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

- src/runtime/hashmap.h