Halide
|
Vulkan Memory Allocator class interface for managing large memory requests stored as contiguous blocks of memory, which are then sub-allocated into smaller regions of memory to avoid the excessive cost of vkAllocate and the limited number of available allocation calls through the API. More...
#include <vulkan_memory.h>
Public Member Functions | |
VulkanMemoryAllocator (const VulkanMemoryAllocator &)=delete | |
VulkanMemoryAllocator & | operator= (const VulkanMemoryAllocator &)=delete |
VulkanMemoryAllocator ()=delete | |
~VulkanMemoryAllocator ()=delete | |
MemoryRegion * | reserve (void *user_context, MemoryRequest &request) |
int | release (void *user_context, MemoryRegion *region) |
int | reclaim (void *user_context, MemoryRegion *region) |
int | retain (void *user_context, MemoryRegion *region) |
bool | collect (void *user_context) |
int | release (void *user_context) |
int | destroy (void *user_context) |
void * | map (void *user_context, MemoryRegion *region) |
int | unmap (void *user_context, MemoryRegion *region) |
MemoryRegion * | create_crop (void *user_context, MemoryRegion *region, uint64_t offset) |
int | destroy_crop (void *user_context, MemoryRegion *region) |
MemoryRegion * | owner_of (void *user_context, MemoryRegion *region) |
VkDevice | current_device () const |
VkPhysicalDevice | current_physical_device () const |
const VkAllocationCallbacks * | callbacks () const |
size_t | bytes_allocated_for_blocks () const |
size_t | blocks_allocated () const |
size_t | bytes_allocated_for_regions () const |
size_t | regions_allocated () const |
Static Public Member Functions | |
static VulkanMemoryAllocator * | create (void *user_context, const VulkanMemoryConfig &config, VkDevice dev, VkPhysicalDevice phys_dev, const SystemMemoryAllocatorFns &system_allocator, const VkAllocationCallbacks *alloc_callbacks=nullptr) |
static int | destroy (void *user_context, VulkanMemoryAllocator *allocator) |
static const VulkanMemoryConfig & | default_config () |
static int | allocate_block (void *instance_ptr, MemoryBlock *block) |
static int | deallocate_block (void *instance_ptr, MemoryBlock *block) |
static int | allocate_region (void *instance_ptr, MemoryRegion *region) |
static int | deallocate_region (void *instance_ptr, MemoryRegion *region) |
Vulkan Memory Allocator class interface for managing large memory requests stored as contiguous blocks of memory, which are then sub-allocated into smaller regions of memory to avoid the excessive cost of vkAllocate and the limited number of available allocation calls through the API.
Definition at line 42 of file vulkan_memory.h.
|
delete |
|
delete |
|
delete |
|
delete |
|
static |
Definition at line 129 of file vulkan_memory.h.
|
static |
Definition at line 151 of file vulkan_memory.h.
MemoryRegion * Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::reserve | ( | void * | user_context, |
MemoryRequest & | request | ||
) |
Definition at line 205 of file vulkan_memory.h.
int Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::release | ( | void * | user_context, |
MemoryRegion * | region | ||
) |
Definition at line 424 of file vulkan_memory.h.
int Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::reclaim | ( | void * | user_context, |
MemoryRegion * | region | ||
) |
Definition at line 443 of file vulkan_memory.h.
int Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::retain | ( | void * | user_context, |
MemoryRegion * | region | ||
) |
Definition at line 462 of file vulkan_memory.h.
bool Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::collect | ( | void * | user_context | ) |
Definition at line 481 of file vulkan_memory.h.
int Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::release | ( | void * | user_context | ) |
Definition at line 492 of file vulkan_memory.h.
int Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::destroy | ( | void * | user_context | ) |
Definition at line 509 of file vulkan_memory.h.
void * Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::map | ( | void * | user_context, |
MemoryRegion * | region | ||
) |
Definition at line 228 of file vulkan_memory.h.
int Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::unmap | ( | void * | user_context, |
MemoryRegion * | region | ||
) |
Definition at line 293 of file vulkan_memory.h.
MemoryRegion * Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::create_crop | ( | void * | user_context, |
MemoryRegion * | region, | ||
uint64_t | offset | ||
) |
Definition at line 332 of file vulkan_memory.h.
int Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::destroy_crop | ( | void * | user_context, |
MemoryRegion * | region | ||
) |
Definition at line 385 of file vulkan_memory.h.
MemoryRegion * Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::owner_of | ( | void * | user_context, |
MemoryRegion * | region | ||
) |
Definition at line 415 of file vulkan_memory.h.
|
inline |
Definition at line 75 of file vulkan_memory.h.
|
inline |
Definition at line 78 of file vulkan_memory.h.
|
inline |
Definition at line 81 of file vulkan_memory.h.
|
static |
Definition at line 525 of file vulkan_memory.h.
|
static |
Definition at line 532 of file vulkan_memory.h.
References halide_error_code_internal_error.
|
static |
Definition at line 639 of file vulkan_memory.h.
References halide_error_code_internal_error.
|
static |
Definition at line 813 of file vulkan_memory.h.
References halide_error_code_internal_error.
|
static |
Definition at line 907 of file vulkan_memory.h.
References halide_error_code_internal_error.
size_t Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::bytes_allocated_for_blocks | ( | ) | const |
Definition at line 711 of file vulkan_memory.h.
size_t Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::blocks_allocated | ( | ) | const |
Definition at line 707 of file vulkan_memory.h.
size_t Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::bytes_allocated_for_regions | ( | ) | const |
Definition at line 980 of file vulkan_memory.h.
size_t Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::regions_allocated | ( | ) | const |
Definition at line 976 of file vulkan_memory.h.