Halide 22.0.0 Halide compiler and libraries

Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Halide::Runtime::Internal::PointerTable Class Reference

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

## Detailed Description

Definition at line 14 of file pointer_table.h.

## Constructor & Destructor Documentation

## ◆ PointerTable() [1/2]

Halide::Runtime::Internal::PointerTable::PointerTable | ( | void * | user_context,
|  | size_t | initial_capacity = `0`,
|  | const SystemMemoryAllocatorFns & | sma = `default_allocator()`
| ) |  |
| explicit

Definition at line 74 of file pointer_table.h.

References Halide::Runtime::Internal::SystemMemoryAllocatorFns::allocate, Halide::Runtime::Internal::SystemMemoryAllocatorFns::deallocate, halide_debug_assert, reserve(), and user_context.

## ◆ PointerTable() [2/2]

Halide::Runtime::Internal::PointerTable::PointerTable | ( | const PointerTable & | other | ) |

Definition at line 83 of file pointer_table.h.

References Halide::Runtime::Internal::SystemMemoryAllocatorFns::allocate, and memcpy().

## ◆ ~PointerTable()

Halide::Runtime::Internal::PointerTable::~PointerTable | ( |  | ) |

Definition at line 95 of file pointer_table.h.

References destroy().

## Member Function Documentation

## ◆ initialize()

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(), and user_context.

## ◆ operator=()

PointerTable & Halide::Runtime::Internal::PointerTable::operator= | ( | const PointerTable & | other | ) |

Definition at line 117 of file pointer_table.h.

References memcpy(), and resize().

## ◆ operator==()

bool Halide::Runtime::Internal::PointerTable::operator== | ( | const PointerTable & | other | ) | const

Definition at line 127 of file pointer_table.h.

References memcmp().

## ◆ operator!=()

bool Halide::Runtime::Internal::PointerTable::operator!= | ( | const PointerTable & | other | ) | const

Definition at line 134 of file pointer_table.h.

## ◆ reserve()

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(), and user_context.

Referenced by initialize(), and PointerTable().

## ◆ resize()

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 debug, default_capacity, Halide::max(), and user_context.

Referenced by clear(), fill(), insert(), operator=(), pop_back(), remove(), and Halide::Runtime::Internal::StringTable::resize().

## ◆ assign()

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, and user_context.

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().

## ◆ insert() [1/2]

void Halide::Runtime::Internal::PointerTable::insert | ( | void * | user_context,
|  | size_t | index,
|  | const void * | entry_ptr
| ) |  |

Definition at line 221 of file pointer_table.h.

References insert(), and user_context.

Referenced by append(), insert(), and prepend().

## ◆ prepend() [1/2]

void Halide::Runtime::Internal::PointerTable::prepend | ( | void * | user_context,
|  | const void * | entry_ptr
| ) |  |

Definition at line 151 of file pointer_table.h.

References insert(), and user_context.

Referenced by Halide::Runtime::Internal::StringTable::prepend().

## ◆ append() [1/2]

void Halide::Runtime::Internal::PointerTable::append | ( | void * | user_context,
|  | const void * | entry_ptr
| ) |  |

Definition at line 155 of file pointer_table.h.

References append(), and user_context.

Referenced by Halide::Runtime::Internal::StringTable::append(), and append().

## ◆ remove() [1/2]

void Halide::Runtime::Internal::PointerTable::remove | ( | void * | user_context,
|  | size_t | index
| ) |  |

Definition at line 226 of file pointer_table.h.

References remove(), and user_context.

Referenced by pop_front(), and remove().

## ◆ fill()

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.

References memcpy(), resize(), and user_context.

## ◆ insert() [2/2]

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(), size(), and user_context.

## ◆ replace()

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 debug, halide_debug_assert, Halide::max(), memcpy(), Halide::min(), and user_context.

Referenced by insert().

## ◆ prepend() [2/2]

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(), and user_context.

## ◆ append() [2/2]

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.

References insert(), size(), and user_context.

## ◆ remove() [2/2]

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 debug, halide_debug_assert, memmove(), resize(), size(), and user_context.

## ◆ pop_front()

void Halide::Runtime::Internal::PointerTable::pop_front | ( | void * | user_context | ) |

Definition at line 159 of file pointer_table.h.

References halide_debug_assert, remove(), and user_context.

## ◆ pop_back()

void Halide::Runtime::Internal::PointerTable::pop_back | ( | void * | user_context | ) |

Definition at line 164 of file pointer_table.h.

References halide_debug_assert, resize(), size(), and user_context.

## ◆ shrink_to_fit()

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, memcpy(), and user_context.

## ◆ clear()

void Halide::Runtime::Internal::PointerTable::clear | ( | void * | user_context | ) |

Definition at line 169 of file pointer_table.h.

References resize(), and user_context.

Referenced by Halide::Runtime::Internal::StringTable::clear().

## ◆ destroy()

void Halide::Runtime::Internal::PointerTable::destroy | ( | void * | user_context | ) |

Definition at line 99 of file pointer_table.h.

References Halide::Runtime::Internal::SystemMemoryAllocatorFns::deallocate, halide_debug_assert, and user_context.

Referenced by Halide::Runtime::Internal::StringTable::destroy(), and ~PointerTable().

## ◆ empty()

bool Halide::Runtime::Internal::PointerTable::empty | ( |  | ) | const

Definition at line 293 of file pointer_table.h.

## ◆ size()

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().

## ◆ operator[]() [1/2]

void * Halide::Runtime::Internal::PointerTable::operator[] | ( | size_t | index | ) |

Definition at line 301 of file pointer_table.h.

References halide_debug_assert.

## ◆ operator[]() [2/2]

void * Halide::Runtime::Internal::PointerTable::operator[] | ( | size_t | index | ) | const

Definition at line 306 of file pointer_table.h.

References halide_debug_assert.

## ◆ data() [1/2]

void ** Halide::Runtime::Internal::PointerTable::data | ( |  | ) |

Definition at line 311 of file pointer_table.h.

Referenced by Halide::Runtime::Internal::StringTable::data().

## ◆ data() [2/2]

const void ** Halide::Runtime::Internal::PointerTable::data | ( |  | ) | const

Definition at line 326 of file pointer_table.h.

## ◆ front()

void * Halide::Runtime::Internal::PointerTable::front | ( |  | ) |

Definition at line 315 of file pointer_table.h.

References halide_debug_assert.

## ◆ back()

void * Halide::Runtime::Internal::PointerTable::back | ( |  | ) |

Definition at line 320 of file pointer_table.h.

References halide_debug_assert.

## ◆ current_allocator()

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().

## ◆ default_allocator()

const SystemMemoryAllocatorFns & Halide::Runtime::Internal::PointerTable::default_allocator | ( |  | ) |
| static

Definition at line 358 of file pointer_table.h.

References Halide::Runtime::Internal::native_system_free(), and Halide::Runtime::Internal::native_system_malloc().

## Member Data Documentation

## ◆ default_capacity

constexpr size_t Halide::Runtime::Internal::PointerTable::default_capacity = 32
| static constexpr

Definition at line 16 of file pointer_table.h.

Referenced by resize().

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

- src/runtime/internal/pointer_table.h