1#ifndef HALIDE_RUNTIME_LINKED_LIST_H
2#define HALIDE_RUNTIME_LINKED_LIST_H
4#include "../HalideRuntime.h"
58 void clear(
void *user_context);
59 void destroy(
void *user_context);
75 size_t entry_count = 0;
110 link_arena =
nullptr;
111 data_arena =
nullptr;
183 if (next_ptr !=
nullptr) {
186 front_ptr = next_ptr;
195 if (prev_ptr !=
nullptr) {
204 if (
empty() ==
false) {
247 if (prev_ptr !=
nullptr) {
256 return append(user_context);
268 if (next_ptr !=
nullptr) {
300 return entry_count == 0;
314LinkedList::reserve(
void *user_context) {
315 EntryType *
entry_ptr =
static_cast<EntryType *
>(
316 link_arena->
reserve(user_context,
true));
323void LinkedList::reclaim(
void *user_context, EntryType *
entry_ptr) {
void initialize(void *user_context, uint32_t entry_size, uint32_t capacity=default_capacity, const SystemMemoryAllocatorFns &allocator=default_allocator())
EntryType * prepend(void *user_context)
const SystemMemoryAllocatorFns & current_allocator() const
EntryType * append(void *user_context)
void clear(void *user_context)
void pop_front(void *user_context)
LinkedList & operator=(const LinkedList &)=delete
static const SystemMemoryAllocatorFns & default_allocator()
EntryType * insert_after(void *user_context, EntryType *entry_ptr)
void remove(void *user_context, EntryType *entry_ptr)
void pop_back(void *user_context)
void destroy(void *user_context)
static constexpr uint32_t default_capacity
LinkedList(const LinkedList &)=delete
EntryType * insert_before(void *user_context, EntryType *entry_ptr)
void * reserve(void *user_context, bool initialize=false)
static MemoryArena * create(void *user_context, const Config &config, const SystemMemoryAllocatorFns &allocator=default_allocator())
const Config & current_config() const
static constexpr uint32_t default_capacity
const SystemMemoryAllocatorFns & current_allocator() const
static void destroy(void *user_context, MemoryArena *arena)
void reclaim(void *user_context, void *ptr)
static const SystemMemoryAllocatorFns & default_allocator()
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
Internal::ConstantInterval cast(Type t, const Internal::ConstantInterval &a)
Cast operators for ConstantIntervals.
#define halide_debug_assert(user_context, cond)
halide_debug_assert() is like halide_assert(), but only expands into a check when DEBUG_RUNTIME is de...
void * memcpy(void *s1, const void *s2, size_t n)
unsigned __INT32_TYPE__ uint32_t