Halide 19.0.0
Halide compiler and libraries
|
#include <pointer_table.h>
Public Member Functions | |
PointerTable (void *user_context, size_t initial_capacity=0, const SystemMemoryAllocatorFns &sma=default_allocator()) | |
PointerTable (const PointerTable &other) | |
~PointerTable () | |
void | initialize (void *user_context, size_t initial_capacity=0, const SystemMemoryAllocatorFns &sma=default_allocator()) |
PointerTable & | operator= (const PointerTable &other) |
bool | operator== (const PointerTable &other) const |
bool | operator!= (const PointerTable &other) const |
void | reserve (void *user_context, size_t capacity, bool free_existing=false) |
void | resize (void *user_context, size_t entry_count, bool realloc=true) |
void | assign (void *user_context, size_t index, const void *entry_ptr) |
void | insert (void *user_context, size_t index, const void *entry_ptr) |
void | prepend (void *user_context, const void *entry_ptr) |
void | append (void *user_context, const void *entry_ptr) |
void | remove (void *user_context, size_t index) |
void | fill (void *user_context, const void **array, size_t array_size) |
void | insert (void *user_context, size_t index, const void **array, size_t array_size) |
void | replace (void *user_context, size_t index, const void **array, size_t array_size) |
void | prepend (void *user_context, const void **array, size_t array_size) |
void | append (void *user_context, const void **array, size_t array_size) |
void | remove (void *user_context, size_t index, size_t entry_count) |
void | pop_front (void *user_context) |
void | pop_back (void *user_context) |
void | shrink_to_fit (void *user_context) |
void | clear (void *user_context) |
void | destroy (void *user_context) |
bool | empty () const |
size_t | size () const |
void * | operator[] (size_t index) |
void * | operator[] (size_t index) const |
void ** | data () |
const void ** | data () const |
void * | front () |
void * | back () |
const SystemMemoryAllocatorFns & | current_allocator () const |
Static Public Member Functions | |
static const SystemMemoryAllocatorFns & | default_allocator () |
Static Public Attributes | |
static constexpr size_t | default_capacity = 32 |
Definition at line 14 of file pointer_table.h.
|
explicit |
Definition at line 74 of file pointer_table.h.
References Halide::Runtime::Internal::SystemMemoryAllocatorFns::allocate, Halide::Runtime::Internal::SystemMemoryAllocatorFns::deallocate, halide_debug_assert, and reserve().
Halide::Runtime::Internal::PointerTable::PointerTable | ( | const PointerTable & | other | ) |
Definition at line 83 of file pointer_table.h.
Halide::Runtime::Internal::PointerTable::~PointerTable | ( | ) |
Definition at line 95 of file pointer_table.h.
References destroy().
void Halide::Runtime::Internal::PointerTable::initialize | ( | void * | user_context, |
size_t | initial_capacity = 0, | ||
const SystemMemoryAllocatorFns & | sma = default_allocator() ) |
Definition at line 108 of file pointer_table.h.
References reserve().
PointerTable & Halide::Runtime::Internal::PointerTable::operator= | ( | const PointerTable & | other | ) |
Definition at line 117 of file pointer_table.h.
bool Halide::Runtime::Internal::PointerTable::operator== | ( | const PointerTable & | other | ) | const |
Definition at line 127 of file pointer_table.h.
References memcmp().
bool Halide::Runtime::Internal::PointerTable::operator!= | ( | const PointerTable & | other | ) | const |
Definition at line 134 of file pointer_table.h.
void Halide::Runtime::Internal::PointerTable::reserve | ( | void * | user_context, |
size_t | capacity, | ||
bool | free_existing = false ) |
Definition at line 173 of file pointer_table.h.
References Halide::max().
Referenced by initialize(), and PointerTable().
void Halide::Runtime::Internal::PointerTable::resize | ( | void * | user_context, |
size_t | entry_count, | ||
bool | realloc = true ) |
Definition at line 181 of file pointer_table.h.
References default_capacity, and Halide::max().
Referenced by clear(), fill(), insert(), operator=(), pop_back(), remove(), and Halide::Runtime::Internal::StringTable::resize().
void Halide::Runtime::Internal::PointerTable::assign | ( | void * | user_context, |
size_t | index, | ||
const void * | entry_ptr ) |
Definition at line 146 of file pointer_table.h.
References halide_debug_assert.
Referenced by Halide::Runtime::Internal::StringTable::assign(), Halide::Runtime::Internal::StringTable::clear(), Halide::Runtime::Internal::StringTable::destroy(), Halide::Runtime::Internal::StringTable::fill(), Halide::Runtime::Internal::StringTable::parse(), and Halide::Runtime::Internal::StringTable::resize().
void Halide::Runtime::Internal::PointerTable::insert | ( | void * | user_context, |
size_t | index, | ||
const void * | entry_ptr ) |
void Halide::Runtime::Internal::PointerTable::prepend | ( | void * | user_context, |
const void * | entry_ptr ) |
Definition at line 151 of file pointer_table.h.
References insert().
Referenced by Halide::Runtime::Internal::StringTable::prepend().
void Halide::Runtime::Internal::PointerTable::append | ( | void * | user_context, |
const void * | entry_ptr ) |
Definition at line 155 of file pointer_table.h.
References append().
Referenced by append(), and Halide::Runtime::Internal::StringTable::append().
void Halide::Runtime::Internal::PointerTable::remove | ( | void * | user_context, |
size_t | index ) |
Definition at line 226 of file pointer_table.h.
References remove().
Referenced by pop_front(), and remove().
void Halide::Runtime::Internal::PointerTable::fill | ( | void * | user_context, |
const void ** | array, | ||
size_t | array_size ) |
Definition at line 138 of file pointer_table.h.
void Halide::Runtime::Internal::PointerTable::insert | ( | void * | user_context, |
size_t | index, | ||
const void ** | array, | ||
size_t | array_size ) |
Definition at line 271 of file pointer_table.h.
References halide_debug_assert, memmove(), replace(), resize(), and size().
void Halide::Runtime::Internal::PointerTable::replace | ( | void * | user_context, |
size_t | index, | ||
const void ** | array, | ||
size_t | array_size ) |
Definition at line 252 of file pointer_table.h.
References halide_debug_assert, Halide::max(), memcpy(), and Halide::min().
Referenced by insert().
void Halide::Runtime::Internal::PointerTable::prepend | ( | void * | user_context, |
const void ** | array, | ||
size_t | array_size ) |
Definition at line 284 of file pointer_table.h.
References insert().
void Halide::Runtime::Internal::PointerTable::append | ( | void * | user_context, |
const void ** | array, | ||
size_t | array_size ) |
Definition at line 288 of file pointer_table.h.
void Halide::Runtime::Internal::PointerTable::remove | ( | void * | user_context, |
size_t | index, | ||
size_t | entry_count ) |
Definition at line 230 of file pointer_table.h.
References halide_debug_assert, memmove(), resize(), and size().
void Halide::Runtime::Internal::PointerTable::pop_front | ( | void * | user_context | ) |
Definition at line 159 of file pointer_table.h.
References halide_debug_assert, and remove().
void Halide::Runtime::Internal::PointerTable::pop_back | ( | void * | user_context | ) |
Definition at line 164 of file pointer_table.h.
References halide_debug_assert, resize(), and size().
void Halide::Runtime::Internal::PointerTable::shrink_to_fit | ( | void * | user_context | ) |
Definition at line 207 of file pointer_table.h.
References Halide::Runtime::Internal::SystemMemoryAllocatorFns::allocate, Halide::Runtime::Internal::SystemMemoryAllocatorFns::deallocate, and memcpy().
void Halide::Runtime::Internal::PointerTable::clear | ( | void * | user_context | ) |
Definition at line 169 of file pointer_table.h.
References resize().
Referenced by Halide::Runtime::Internal::StringTable::clear().
void Halide::Runtime::Internal::PointerTable::destroy | ( | void * | user_context | ) |
Definition at line 99 of file pointer_table.h.
References Halide::Runtime::Internal::SystemMemoryAllocatorFns::deallocate, and halide_debug_assert.
Referenced by Halide::Runtime::Internal::StringTable::destroy(), and ~PointerTable().
bool Halide::Runtime::Internal::PointerTable::empty | ( | ) | const |
Definition at line 293 of file pointer_table.h.
size_t Halide::Runtime::Internal::PointerTable::size | ( | ) | const |
Definition at line 297 of file pointer_table.h.
Referenced by append(), Halide::Runtime::Internal::StringTable::assign(), Halide::Runtime::Internal::StringTable::clear(), Halide::Runtime::Internal::StringTable::contains(), Halide::Runtime::Internal::StringTable::destroy(), Halide::Runtime::Internal::StringTable::fill(), insert(), Halide::Runtime::Internal::StringTable::operator[](), Halide::Runtime::Internal::StringTable::parse(), pop_back(), remove(), Halide::Runtime::Internal::StringTable::resize(), and Halide::Runtime::Internal::StringTable::size().
void * Halide::Runtime::Internal::PointerTable::operator[] | ( | size_t | index | ) |
Definition at line 301 of file pointer_table.h.
References halide_debug_assert.
void * Halide::Runtime::Internal::PointerTable::operator[] | ( | size_t | index | ) | const |
Definition at line 306 of file pointer_table.h.
References halide_debug_assert.
void ** Halide::Runtime::Internal::PointerTable::data | ( | ) |
Definition at line 311 of file pointer_table.h.
Referenced by Halide::Runtime::Internal::StringTable::data().
const void ** Halide::Runtime::Internal::PointerTable::data | ( | ) | const |
Definition at line 326 of file pointer_table.h.
void * Halide::Runtime::Internal::PointerTable::front | ( | ) |
Definition at line 315 of file pointer_table.h.
References halide_debug_assert.
void * Halide::Runtime::Internal::PointerTable::back | ( | ) |
Definition at line 320 of file pointer_table.h.
References halide_debug_assert.
const SystemMemoryAllocatorFns & Halide::Runtime::Internal::PointerTable::current_allocator | ( | ) | const |
Definition at line 353 of file pointer_table.h.
Referenced by Halide::Runtime::Internal::StringTable::append(), Halide::Runtime::Internal::StringTable::prepend(), and Halide::Runtime::Internal::StringTable::resize().
|
static |
Definition at line 358 of file pointer_table.h.
References Halide::Runtime::Internal::native_system_free(), and Halide::Runtime::Internal::native_system_malloc().
|
staticconstexpr |
Definition at line 16 of file pointer_table.h.
Referenced by resize().