Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
Halide::Runtime::Internal::HashMap Struct Reference

#include <hashmap.h>

Inheritance diagram for Halide::Runtime::Internal::HashMap:
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 ()
 

Public Attributes

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

static const size_t kHashTableSize = 256
 

Detailed Description

Definition at line 120 of file hashmap.h.

Member Function Documentation

◆ init()

◆ prune()

◆ set_size()

void Halide::Runtime::Internal::HashMap::set_size ( int64_t size)
inline

Definition at line 226 of file hashmap.h.

References kDefaultCacheSize, max_cache_size, memoization_lock, and prune().

◆ lookup()

◆ store()

◆ release()

void Halide::Runtime::Internal::HashMap::release ( void * user_context,
void * host )
inline

Definition at line 364 of file hashmap.h.

References halide_debug_assert, and user_context.

◆ cleanup()

Member Data Documentation

◆ memoization_lock

halide_mutex Halide::Runtime::Internal::HashMap::memoization_lock

Definition at line 121 of file hashmap.h.

Referenced by init(), lookup(), set_size(), and store().

◆ kHashTableSize

const size_t Halide::Runtime::Internal::HashMap::kHashTableSize = 256
static

Definition at line 123 of file hashmap.h.

Referenced by lookup(), prune(), and store().

◆ cache_entries

CacheEntry* Halide::Runtime::Internal::HashMap::cache_entries[kHashTableSize]

Definition at line 125 of file hashmap.h.

Referenced by cleanup(), init(), lookup(), prune(), and store().

◆ most_recently_used

CacheEntry* Halide::Runtime::Internal::HashMap::most_recently_used

Definition at line 127 of file hashmap.h.

Referenced by cleanup(), init(), lookup(), prune(), and store().

◆ least_recently_used

CacheEntry* Halide::Runtime::Internal::HashMap::least_recently_used

Definition at line 128 of file hashmap.h.

Referenced by cleanup(), init(), lookup(), prune(), and store().

◆ kDefaultCacheSize

uint64_t Halide::Runtime::Internal::HashMap::kDefaultCacheSize

Definition at line 130 of file hashmap.h.

Referenced by init(), and set_size().

◆ max_cache_size

int64_t Halide::Runtime::Internal::HashMap::max_cache_size

Definition at line 131 of file hashmap.h.

Referenced by init(), prune(), and set_size().

◆ current_cache_size

int64_t Halide::Runtime::Internal::HashMap::current_cache_size

Definition at line 132 of file hashmap.h.

Referenced by cleanup(), init(), prune(), and store().

◆ copy_value

copy_value_func Halide::Runtime::Internal::HashMap::copy_value

Definition at line 134 of file hashmap.h.

Referenced by init(), lookup(), and store().

◆ destroy_value

destroy_value_func Halide::Runtime::Internal::HashMap::destroy_value

Definition at line 135 of file hashmap.h.

Referenced by cleanup(), init(), prune(), and store().

◆ user_context

◆ inited

bool Halide::Runtime::Internal::HashMap::inited

Definition at line 139 of file hashmap.h.

Referenced by init(), and store().


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