Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
Halide::Runtime::Internal::MemoryArena Class Reference

#include <memory_arena.h>

Classes

struct  Config
 

Public Member Functions

 MemoryArena (const MemoryArena &)=delete
 
MemoryArenaoperator= (const MemoryArena &)=delete
 
 MemoryArena (void *user_context, const Config &config=default_config(), const SystemMemoryAllocatorFns &allocator=default_allocator())
 
 ~MemoryArena ()
 
void initialize (void *user_context, const Config &config, const SystemMemoryAllocatorFns &allocator=default_allocator())
 
void * reserve (void *user_context, bool initialize=false)
 
void reclaim (void *user_context, void *ptr)
 
bool collect (void *user_context)
 
void destroy (void *user_context)
 
const Configcurrent_config () const
 
const SystemMemoryAllocatorFnscurrent_allocator () const
 

Static Public Member Functions

static MemoryArenacreate (void *user_context, const Config &config, const SystemMemoryAllocatorFns &allocator=default_allocator())
 
static void destroy (void *user_context, MemoryArena *arena)
 
static const Configdefault_config ()
 
static const SystemMemoryAllocatorFnsdefault_allocator ()
 

Static Public Attributes

static constexpr uint32_t default_capacity = uint32_t(32)
 

Detailed Description

Definition at line 17 of file memory_arena.h.

Constructor & Destructor Documentation

◆ MemoryArena() [1/2]

Halide::Runtime::Internal::MemoryArena::MemoryArena ( const MemoryArena & )
delete

◆ MemoryArena() [2/2]

Halide::Runtime::Internal::MemoryArena::MemoryArena ( void * user_context,
const Config & config = default_config(),
const SystemMemoryAllocatorFns & allocator = default_allocator() )
explicit

Definition at line 89 of file memory_arena.h.

◆ ~MemoryArena()

Halide::Runtime::Internal::MemoryArena::~MemoryArena ( )

Definition at line 97 of file memory_arena.h.

References destroy().

Member Function Documentation

◆ operator=()

MemoryArena & Halide::Runtime::Internal::MemoryArena::operator= ( const MemoryArena & )
delete

◆ create()

MemoryArena * Halide::Runtime::Internal::MemoryArena::create ( void * user_context,
const Config & config,
const SystemMemoryAllocatorFns & allocator = default_allocator() )
static

◆ destroy() [1/2]

◆ initialize()

void Halide::Runtime::Internal::MemoryArena::initialize ( void * user_context,
const Config & config,
const SystemMemoryAllocatorFns & allocator = default_allocator() )

◆ reserve()

void * Halide::Runtime::Internal::MemoryArena::reserve ( void * user_context,
bool initialize = false )

◆ reclaim()

void Halide::Runtime::Internal::MemoryArena::reclaim ( void * user_context,
void * ptr )

◆ collect()

bool Halide::Runtime::Internal::MemoryArena::collect ( void * user_context)

◆ destroy() [2/2]

void Halide::Runtime::Internal::MemoryArena::destroy ( void * user_context)

◆ current_config()

◆ default_config()

const MemoryArena::Config & Halide::Runtime::Internal::MemoryArena::default_config ( )
static

Definition at line 292 of file memory_arena.h.

◆ current_allocator()

const SystemMemoryAllocatorFns & Halide::Runtime::Internal::MemoryArena::current_allocator ( ) const

◆ default_allocator()

const SystemMemoryAllocatorFns & Halide::Runtime::Internal::MemoryArena::default_allocator ( )
static

Member Data Documentation

◆ default_capacity

uint32_t Halide::Runtime::Internal::MemoryArena::default_capacity = uint32_t(32)
staticconstexpr

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