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

Allocator class interface for sub-allocating a contiguous memory block into smaller regions of memory. More...

#include <region_allocator.h>

Classes

struct  MemoryAllocators
 

Public Member Functions

 RegionAllocator (const RegionAllocator &)=delete
 
RegionAllocatoroperator= (const RegionAllocator &)=delete
 
 RegionAllocator ()=delete
 
 ~RegionAllocator ()=delete
 
MemoryRegionreserve (void *user_context, const MemoryRequest &request)
 
int conform (void *user_context, MemoryRequest *request) const
 
int release (void *user_context, MemoryRegion *memory_region)
 
int reclaim (void *user_context, MemoryRegion *memory_region)
 
int retain (void *user_context, MemoryRegion *memory_region)
 
bool collect (void *user_context)
 
int release (void *user_context)
 
int destroy (void *user_context)
 
BlockResourceblock_resource () const
 

Static Public Member Functions

static RegionAllocatorcreate (void *user_context, BlockResource *block, const MemoryAllocators &ma)
 
static int destroy (void *user_context, RegionAllocator *region_allocator)
 
static RegionAllocatorfind_allocator (void *user_context, MemoryRegion *memory_region)
 

Detailed Description

Allocator class interface for sub-allocating a contiguous memory block into smaller regions of memory.

This class only manages the address creation for the regions – allocation callback functions are used to request the memory from the necessary system or API calls. This class is intended to be used inside of a higher level memory management class that provides thread safety, policy management and API integration for a specific runtime API (eg Vulkan, OpenCL, etc)

Definition at line 24 of file region_allocator.h.

Constructor & Destructor Documentation

◆ RegionAllocator() [1/2]

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

◆ RegionAllocator() [2/2]

Halide::Runtime::Internal::RegionAllocator::RegionAllocator ( )
delete

◆ ~RegionAllocator()

Halide::Runtime::Internal::RegionAllocator::~RegionAllocator ( )
delete

Member Function Documentation

◆ operator=()

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

◆ create()

RegionAllocator * Halide::Runtime::Internal::RegionAllocator::create ( void * user_context,
BlockResource * block,
const MemoryAllocators & ma )
static

◆ destroy() [1/2]

int Halide::Runtime::Internal::RegionAllocator::destroy ( void * user_context,
RegionAllocator * region_allocator )
static

◆ find_allocator()

◆ reserve()

◆ conform()

◆ release() [1/2]

◆ reclaim()

int Halide::Runtime::Internal::RegionAllocator::reclaim ( void * user_context,
MemoryRegion * memory_region )

◆ retain()

◆ collect()

◆ release() [2/2]

int Halide::Runtime::Internal::RegionAllocator::release ( void * user_context)

◆ destroy() [2/2]

◆ block_resource()


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