Halide
|
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 | |
RegionAllocator & | operator= (const RegionAllocator &)=delete |
RegionAllocator ()=delete | |
~RegionAllocator ()=delete | |
MemoryRegion * | reserve (void *user_context, const MemoryRequest &request) |
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) |
BlockResource * | block_resource () const |
Static Public Member Functions | |
static RegionAllocator * | create (void *user_context, BlockResource *block, const MemoryAllocators &ma) |
static int | destroy (void *user_context, RegionAllocator *region_allocator) |
static RegionAllocator * | find_allocator (void *user_context, MemoryRegion *memory_region) |
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.
|
delete |
|
delete |
|
delete |
|
delete |
|
static |
Definition at line 113 of file region_allocator.h.
|
static |
Definition at line 126 of file region_allocator.h.
|
static |
Definition at line 217 of file region_allocator.h.
MemoryRegion * Halide::Runtime::Internal::RegionAllocator::reserve | ( | void * | user_context, |
const MemoryRequest & | request | ||
) |
Definition at line 149 of file region_allocator.h.
int Halide::Runtime::Internal::RegionAllocator::release | ( | void * | user_context, |
MemoryRegion * | memory_region | ||
) |
Definition at line 184 of file region_allocator.h.
int Halide::Runtime::Internal::RegionAllocator::reclaim | ( | void * | user_context, |
MemoryRegion * | memory_region | ||
) |
Definition at line 194 of file region_allocator.h.
int Halide::Runtime::Internal::RegionAllocator::retain | ( | void * | user_context, |
MemoryRegion * | memory_region | ||
) |
Definition at line 209 of file region_allocator.h.
bool Halide::Runtime::Internal::RegionAllocator::collect | ( | void * | user_context | ) |
Definition at line 635 of file region_allocator.h.
int Halide::Runtime::Internal::RegionAllocator::release | ( | void * | user_context | ) |
Definition at line 618 of file region_allocator.h.
int Halide::Runtime::Internal::RegionAllocator::destroy | ( | void * | user_context | ) |
Definition at line 682 of file region_allocator.h.
BlockResource * Halide::Runtime::Internal::RegionAllocator::block_resource | ( | ) | const |
Definition at line 739 of file region_allocator.h.