Loading...
Searching...
No Matches
memory_resources.h
Go to the documentation of this file.
#ifndef HALIDE_RUNTIME_MEMORY_RESOURCES_H
#define HALIDE_RUNTIME_MEMORY_RESOURCES_H
#include "../HalideRuntime.h"
namespace Halide {
namespace Runtime {
namespace Internal {
// --
// Hint for allocation usage indicating whether or not the resource
// is in use, available, or dedicated (and can't be split or shared)
enum class AllocationStatus {
InvalidStatus,
InUse,
Available,
Purgeable,
Dedicated
};
// Hint for allocation requests indicating intended usage
// required between host and device address space mappings
enum class MemoryVisibility {
InvalidVisibility, //< invalid enum value
HostOnly, //< host local
DeviceOnly, //< device local
DeviceToHost, //< transfer from device to host
HostToDevice, //< transfer from host to device
DefaultVisibility, //< default visibility (use any valid visibility -- unable to determine prior to usage)
};
// Hint for allocation requests indicating intended update
// frequency for modifying the contents of the allocation
enum class MemoryUsage {
InvalidUsage, //< invalid enum value
StaticStorage, //< intended for static storage, whereby the contents will be set once and remain unchanged
DynamicStorage, //< intended for dyanmic storage, whereby the contents will be set frequently and change constantly
UniformStorage, //< intended for fast & small fixed read-only uniform storage (intended for passing shader parameters), whereby the contents will be set once and remain unchanged
TransferSrc, //< intended for staging storage updates, whereby the contents will be used as the source of a transfer
TransferDst, //< intended for staging storage updates, whereby the contents will be used as the destination of a transfer
TransferSrcDst, //< intended for staging storage updates, whereby the contents will be used either as a source or destination of a transfer
DefaultUsage //< default usage (use any valid usage -- unable to determine prior to usage)
};
// Hint for allocation requests indicating ideal caching support (if available)
enum class MemoryCaching {
InvalidCaching, //< invalid enum value
Cached, //< cached
Uncached, //< uncached
CachedCoherent, //< cached and coherent
UncachedCoherent, //< uncached but still coherent
DefaultCaching //< default caching (use any valid caching behaviour -- unable to determine prior to usage)
};
struct MemoryProperties {
MemoryVisibility visibility = MemoryVisibility::InvalidVisibility;
MemoryUsage usage = MemoryUsage::InvalidUsage;
MemoryCaching caching = MemoryCaching::InvalidCaching;
size_t alignment = 0; //< required alignment of allocations (zero for no constraint)
size_t nearest_multiple = 0; //< require the allocation size to round up to the nearest multiple (zero means no rounding)
};
// Client-facing struct for exchanging memory block allocation requests
struct MemoryBlock {
void *handle = nullptr; //< client data storing native handle (managed by alloc_block_region/free_block_region)
size_t size = 0; //< allocated size (in bytes)
bool dedicated = false; //< flag indicating whether allocation is one dedicated resource (or split/shared into other resources)
MemoryProperties properties; //< properties for the allocated block
};
// Client-facing struct for specifying a range of a memory region (eg for crops)
struct MemoryRange {
size_t head_offset = 0; //< byte offset from start of region
size_t tail_offset = 0; //< byte offset from end of region
};
// Client-facing struct for exchanging memory region allocation requests
struct MemoryRegion {
void *handle = nullptr; //< client data storing native handle (managed by alloc_block_region/free_block_region) or a pointer to region owning allocation
size_t offset = 0; //< offset from base address in block (in bytes)
size_t size = 0; //< allocated size (in bytes)
MemoryRange range; //< optional range (e.g. for handling crops, etc)
bool dedicated = false; //< flag indicating whether allocation is one dedicated resource (or split/shared into other resources)
bool is_owner = true; //< flag indicating whether allocation is owned by this region, in which case handle is a native handle. Otherwise handle points to owning region of alloction.
MemoryProperties properties; //< properties for the allocated region
};
// Client-facing struct for issuing memory allocation requests
struct MemoryRequest {
size_t offset = 0; //< offset from base address in block (in bytes)
size_t size = 0; //< allocated size (in bytes)
size_t alignment = 0; //< alignment constraint for address
bool dedicated = false; //< flag indicating whether allocation is one dedicated resource (or split/shared into other resources)
MemoryProperties properties; //< properties for the allocated region
};
class RegionAllocator;
struct BlockRegion;
// Internal struct for block resource state
// -- Note: first field must MemoryBlock
struct BlockResource {
MemoryBlock memory; //< memory info for the allocated block
RegionAllocator *allocator = nullptr; //< designated allocator for the block
BlockRegion *regions = nullptr; //< head of linked list of memory regions
size_t reserved = 0; //< number of bytes already reserved to regions
};
// Internal struct for block region state
// -- Note: first field must MemoryRegion
struct BlockRegion {
MemoryRegion memory; //< memory info for the allocated region
uint32_t usage_count = 0; //< number of active clients using region
AllocationStatus status = AllocationStatus::InvalidStatus; //< allocation status indicator
BlockRegion *next_ptr = nullptr; //< pointer to next block region in linked list
BlockRegion *prev_ptr = nullptr; //< pointer to prev block region in linked list
BlockResource *block_ptr = nullptr; //< pointer to parent block resource
};
// Returns true if given byte alignment is a power of two
ALWAYS_INLINE bool is_power_of_two_alignment(size_t x) {
return (x & (x - 1)) == 0;
}
// Returns an aligned byte offset to adjust the given offset based on alignment constraints
// -- Alignment must be power of two!
ALWAYS_INLINE size_t aligned_offset(size_t offset, size_t alignment) {
halide_abort_if_false(nullptr, is_power_of_two_alignment(alignment));
return (alignment == 0) ? (offset) : (offset + (alignment - 1)) & ~(alignment - 1);
}
// Returns a suitable alignment such that requested alignment is a suitable
// integer multiple of the required alignment
ALWAYS_INLINE size_t conform_alignment(size_t requested, size_t required) {
size_t alignment = max(requested, required);
return ((required > 0) && (alignment > required)) ? (required * ((alignment / required) + 1)) : alignment;
}
// Returns a padded size to accommodate an adjusted offset due to alignment constraints
// -- Alignment must be power of two!
ALWAYS_INLINE size_t aligned_size(size_t offset, size_t size, size_t alignment) {
size_t actual_offset = aligned_offset(offset, alignment);
size_t padding = actual_offset - offset;
size_t actual_size = padding + size;
return actual_size;
}
// Returns a padded size to accommodate an adjusted offset due to alignment constraints rounded up to the nearest multiple
// -- Alignment must be power of two!
ALWAYS_INLINE size_t conform_size(size_t offset, size_t size, size_t alignment, size_t nearest_multiple) {
size_t adjusted_size = aligned_size(offset, size, alignment);
adjusted_size = (alignment > adjusted_size) ? alignment : adjusted_size;
if (nearest_multiple > 0) {
size_t rounded_size = (((adjusted_size + nearest_multiple - 1) / nearest_multiple) * nearest_multiple);
return rounded_size;
} else {
return adjusted_size;
}
}
// Clamps the given value to be within the [min_value, max_value] range
ALWAYS_INLINE size_t clamped_size(size_t value, size_t min_value, size_t max_value) {
size_t result = (value < min_value) ? min_value : value;
return (result > max_value) ? max_value : result;
}
// Offset the untyped pointer by the given number of bytes
ALWAYS_INLINE const void *offset_address(const void *address, size_t byte_offset) {
const uintptr_t base = reinterpret_cast<uintptr_t>(address);
return reinterpret_cast<const void *>(base + byte_offset);
}
// Offset the untyped pointer by the given number of bytes
ALWAYS_INLINE void *offset_address(void *address, size_t byte_offset) {
const uintptr_t base = reinterpret_cast<uintptr_t>(address);
return reinterpret_cast<void *>(base + byte_offset);
}
// --
typedef void *(*AllocateSystemFn)(void *, size_t);
typedef void (*DeallocateSystemFn)(void *, void *);
ALWAYS_INLINE void *native_system_malloc(void *user_context, size_t bytes) {
return malloc(bytes);
}
ALWAYS_INLINE void native_system_free(void *user_context, void *ptr) {
free(ptr);
}
struct SystemMemoryAllocatorFns {
AllocateSystemFn allocate = nullptr;
DeallocateSystemFn deallocate = nullptr;
};
struct HalideSystemAllocatorFns {
AllocateSystemFn allocate = halide_malloc;
DeallocateSystemFn deallocate = halide_free;
};
typedef int (*AllocateBlockFn)(void *, MemoryBlock *);
typedef int (*DeallocateBlockFn)(void *, MemoryBlock *);
typedef int (*ConformBlockRequestFn)(void *, MemoryRequest *);
struct MemoryBlockAllocatorFns {
AllocateBlockFn allocate = nullptr;
DeallocateBlockFn deallocate = nullptr;
ConformBlockRequestFn conform = nullptr;
};
typedef int (*AllocateRegionFn)(void *, MemoryRegion *);
typedef int (*DeallocateRegionFn)(void *, MemoryRegion *);
typedef int (*ConformBlockRegionFn)(void *, MemoryRequest *);
struct MemoryRegionAllocatorFns {
AllocateRegionFn allocate = nullptr;
DeallocateRegionFn deallocate = nullptr;
ConformBlockRegionFn conform = nullptr;
};
// --
} // namespace Internal
} // namespace Runtime
} // namespace Halide
// --
extern "C" {
WEAK const char *halide_memory_visibility_name(MemoryVisibility value) {
switch (value) {
case MemoryVisibility::InvalidVisibility: {
return "InvalidVisibility";
}
case MemoryVisibility::DefaultVisibility: {
return "DefaultVisibility";
}
case MemoryVisibility::HostOnly: {
return "HostOnly";
}
case MemoryVisibility::DeviceOnly: {
return "DeviceOnly";
}
case MemoryVisibility::HostToDevice: {
return "HostToDevice";
}
case MemoryVisibility::DeviceToHost: {
return "DeviceToHost";
}
default: {
return "<unknown memory visibility value>";
}
};
return "<unknown memory visibility value>";
}
WEAK const char *halide_memory_usage_name(MemoryUsage value) {
switch (value) {
case MemoryUsage::InvalidUsage: {
return "InvalidUsage";
}
case MemoryUsage::DefaultUsage: {
return "DefaultUsage";
}
case MemoryUsage::StaticStorage: {
return "StaticStorage";
}
case MemoryUsage::DynamicStorage: {
return "DynamicStorage";
}
case MemoryUsage::UniformStorage: {
return "UniformStorage";
}
case MemoryUsage::TransferSrc: {
return "TransferSrc";
}
case MemoryUsage::TransferDst: {
return "TransferDst";
}
case MemoryUsage::TransferSrcDst: {
return "TransferSrcDst";
}
default: {
return "<unknown memory usage value>";
}
};
return "<unknown memory usage value>";
}
WEAK const char *halide_memory_caching_name(MemoryCaching value) {
switch (value) {
case MemoryCaching::InvalidCaching: {
return "InvalidCaching";
}
case MemoryCaching::DefaultCaching: {
return "DefaultCaching";
}
case MemoryCaching::Cached: {
return "Cached";
}
case MemoryCaching::Uncached: {
return "Uncached";
}
case MemoryCaching::CachedCoherent: {
return "CachedCoherent";
}
case MemoryCaching::UncachedCoherent: {
return "UncachedCoherent";
}
default: {
return "<unknown memory visibility value>";
}
};
return "<unknown memory visibility value>";
}
} // extern "C"
// --
#endif // HALIDE_RUNTIME_MEMORY_RESOURCES_H
HalideRuntime.h
This file declares the routines used by Halide internally in its runtime.
halide_malloc
void * halide_malloc(void *user_context, size_t x)
Halide calls these functions to allocate and free memory.
halide_free
void halide_free(void *user_context, void *ptr)
Halide::Runtime::Internal::RegionAllocator
Allocator class interface for sub-allocating a contiguous memory block into smaller regions of memory...
Definition region_allocator.h:24
halide_memory_caching_name
WEAK const char * halide_memory_caching_name(MemoryCaching value)
Definition memory_resources.h:293
halide_memory_usage_name
WEAK const char * halide_memory_usage_name(MemoryUsage value)
Definition memory_resources.h:260
halide_memory_visibility_name
WEAK const char * halide_memory_visibility_name(MemoryVisibility value)
Definition memory_resources.h:233
Halide::Runtime::Internal
Definition constants.h:13
Halide::Runtime::Internal::AllocateSystemFn
void *(* AllocateSystemFn)(void *, size_t)
Definition memory_resources.h:182
Halide::Runtime::Internal::AllocateBlockFn
int(* AllocateBlockFn)(void *, MemoryBlock *)
Definition memory_resources.h:203
Halide::Runtime::Internal::ConformBlockRegionFn
int(* ConformBlockRegionFn)(void *, MemoryRequest *)
Definition memory_resources.h:215
Halide::Runtime::Internal::ConformBlockRequestFn
int(* ConformBlockRequestFn)(void *, MemoryRequest *)
Definition memory_resources.h:205
Halide::Runtime::Internal::native_system_malloc
ALWAYS_INLINE void * native_system_malloc(void *user_context, size_t bytes)
Definition memory_resources.h:185
Halide::Runtime::Internal::AllocateRegionFn
int(* AllocateRegionFn)(void *, MemoryRegion *)
Definition memory_resources.h:213
Halide::Runtime::Internal::conform_alignment
ALWAYS_INLINE size_t conform_alignment(size_t requested, size_t required)
Definition memory_resources.h:135
Halide::Runtime::Internal::MemoryUsage
MemoryUsage
Definition memory_resources.h:35
Halide::Runtime::Internal::MemoryUsage::TransferSrcDst
@ TransferSrcDst
Definition memory_resources.h:42
Halide::Runtime::Internal::MemoryUsage::DefaultUsage
@ DefaultUsage
Definition memory_resources.h:43
Halide::Runtime::Internal::MemoryUsage::DynamicStorage
@ DynamicStorage
Definition memory_resources.h:38
Halide::Runtime::Internal::MemoryUsage::UniformStorage
@ UniformStorage
Definition memory_resources.h:39
Halide::Runtime::Internal::MemoryUsage::InvalidUsage
@ InvalidUsage
Definition memory_resources.h:36
Halide::Runtime::Internal::MemoryUsage::StaticStorage
@ StaticStorage
Definition memory_resources.h:37
Halide::Runtime::Internal::MemoryUsage::TransferSrc
@ TransferSrc
Definition memory_resources.h:40
Halide::Runtime::Internal::MemoryUsage::TransferDst
@ TransferDst
Definition memory_resources.h:41
Halide::Runtime::Internal::AllocationStatus
AllocationStatus
Definition memory_resources.h:14
Halide::Runtime::Internal::AllocationStatus::InvalidStatus
@ InvalidStatus
Definition memory_resources.h:15
Halide::Runtime::Internal::AllocationStatus::Available
@ Available
Definition memory_resources.h:17
Halide::Runtime::Internal::AllocationStatus::Dedicated
@ Dedicated
Definition memory_resources.h:19
Halide::Runtime::Internal::AllocationStatus::InUse
@ InUse
Definition memory_resources.h:16
Halide::Runtime::Internal::AllocationStatus::Purgeable
@ Purgeable
Definition memory_resources.h:18
Halide::Runtime::Internal::is_power_of_two_alignment
ALWAYS_INLINE bool is_power_of_two_alignment(size_t x)
Definition memory_resources.h:122
Halide::Runtime::Internal::conform_size
ALWAYS_INLINE size_t conform_size(size_t offset, size_t size, size_t alignment, size_t nearest_multiple)
Definition memory_resources.h:151
Halide::Runtime::Internal::native_system_free
ALWAYS_INLINE void native_system_free(void *user_context, void *ptr)
Definition memory_resources.h:189
Halide::Runtime::Internal::clamped_size
ALWAYS_INLINE size_t clamped_size(size_t value, size_t min_value, size_t max_value)
Definition memory_resources.h:163
Halide::Runtime::Internal::aligned_size
ALWAYS_INLINE size_t aligned_size(size_t offset, size_t size, size_t alignment)
Definition memory_resources.h:142
Halide::Runtime::Internal::DeallocateSystemFn
void(* DeallocateSystemFn)(void *, void *)
Definition memory_resources.h:183
Halide::Runtime::Internal::MemoryVisibility
MemoryVisibility
Definition memory_resources.h:24
Halide::Runtime::Internal::MemoryVisibility::DefaultVisibility
@ DefaultVisibility
Definition memory_resources.h:30
Halide::Runtime::Internal::MemoryVisibility::DeviceToHost
@ DeviceToHost
Definition memory_resources.h:28
Halide::Runtime::Internal::MemoryVisibility::InvalidVisibility
@ InvalidVisibility
Definition memory_resources.h:25
Halide::Runtime::Internal::MemoryVisibility::HostToDevice
@ HostToDevice
Definition memory_resources.h:29
Halide::Runtime::Internal::MemoryVisibility::HostOnly
@ HostOnly
Definition memory_resources.h:26
Halide::Runtime::Internal::MemoryVisibility::DeviceOnly
@ DeviceOnly
Definition memory_resources.h:27
Halide::Runtime::Internal::DeallocateBlockFn
int(* DeallocateBlockFn)(void *, MemoryBlock *)
Definition memory_resources.h:204
Halide::Runtime::Internal::DeallocateRegionFn
int(* DeallocateRegionFn)(void *, MemoryRegion *)
Definition memory_resources.h:214
Halide::Runtime::Internal::MemoryCaching
MemoryCaching
Definition memory_resources.h:47
Halide::Runtime::Internal::MemoryCaching::Cached
@ Cached
Definition memory_resources.h:49
Halide::Runtime::Internal::MemoryCaching::InvalidCaching
@ InvalidCaching
Definition memory_resources.h:48
Halide::Runtime::Internal::MemoryCaching::UncachedCoherent
@ UncachedCoherent
Definition memory_resources.h:52
Halide::Runtime::Internal::MemoryCaching::DefaultCaching
@ DefaultCaching
Definition memory_resources.h:53
Halide::Runtime::Internal::MemoryCaching::Uncached
@ Uncached
Definition memory_resources.h:50
Halide::Runtime::Internal::MemoryCaching::CachedCoherent
@ CachedCoherent
Definition memory_resources.h:51
Halide::Runtime::Internal::offset_address
ALWAYS_INLINE const void * offset_address(const void *address, size_t byte_offset)
Definition memory_resources.h:169
Halide::Runtime::Internal::aligned_offset
ALWAYS_INLINE size_t aligned_offset(size_t offset, size_t alignment)
Definition memory_resources.h:128
Halide::Runtime
Definition constants.h:12
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::max
Expr max(const FuncRef &a, const FuncRef &b)
Definition Func.h:606
uintptr_t
__UINTPTR_TYPE__ uintptr_t
Definition runtime_internal.h:75
malloc
void * malloc(size_t)
ALWAYS_INLINE
#define ALWAYS_INLINE
Definition runtime_internal.h:57
size_t
__SIZE_TYPE__ size_t
Definition runtime_internal.h:31
uint32_t
unsigned __INT32_TYPE__ uint32_t
Definition runtime_internal.h:25
halide_abort_if_false
#define halide_abort_if_false(user_context, cond)
Definition runtime_internal.h:271
WEAK
#define WEAK
Definition runtime_internal.h:52
free
void free(void *)
Halide::Runtime::Internal::BlockRegion
Definition memory_resources.h:112
Halide::Runtime::Internal::BlockRegion::next_ptr
BlockRegion * next_ptr
Definition memory_resources.h:116
Halide::Runtime::Internal::BlockRegion::usage_count
uint32_t usage_count
Definition memory_resources.h:114
Halide::Runtime::Internal::BlockRegion::status
AllocationStatus status
Definition memory_resources.h:115
Halide::Runtime::Internal::BlockRegion::memory
MemoryRegion memory
Definition memory_resources.h:113
Halide::Runtime::Internal::BlockRegion::prev_ptr
BlockRegion * prev_ptr
Definition memory_resources.h:117
Halide::Runtime::Internal::BlockRegion::block_ptr
BlockResource * block_ptr
Definition memory_resources.h:118
Halide::Runtime::Internal::BlockResource
Definition memory_resources.h:103
Halide::Runtime::Internal::BlockResource::reserved
size_t reserved
Definition memory_resources.h:107
Halide::Runtime::Internal::BlockResource::allocator
RegionAllocator * allocator
Definition memory_resources.h:105
Halide::Runtime::Internal::BlockResource::memory
MemoryBlock memory
Definition memory_resources.h:104
Halide::Runtime::Internal::BlockResource::regions
BlockRegion * regions
Definition memory_resources.h:106
Halide::Runtime::Internal::HalideSystemAllocatorFns
Definition memory_resources.h:198
Halide::Runtime::Internal::HalideSystemAllocatorFns::deallocate
DeallocateSystemFn deallocate
Definition memory_resources.h:200
Halide::Runtime::Internal::HalideSystemAllocatorFns::allocate
AllocateSystemFn allocate
Definition memory_resources.h:199
Halide::Runtime::Internal::MemoryBlockAllocatorFns
Definition memory_resources.h:207
Halide::Runtime::Internal::MemoryBlockAllocatorFns::deallocate
DeallocateBlockFn deallocate
Definition memory_resources.h:209
Halide::Runtime::Internal::MemoryBlockAllocatorFns::allocate
AllocateBlockFn allocate
Definition memory_resources.h:208
Halide::Runtime::Internal::MemoryBlockAllocatorFns::conform
ConformBlockRequestFn conform
Definition memory_resources.h:210
Halide::Runtime::Internal::MemoryBlock
Definition memory_resources.h:65
Halide::Runtime::Internal::MemoryBlock::handle
void * handle
Definition memory_resources.h:66
Halide::Runtime::Internal::MemoryBlock::dedicated
bool dedicated
Definition memory_resources.h:68
Halide::Runtime::Internal::MemoryBlock::properties
MemoryProperties properties
Definition memory_resources.h:69
Halide::Runtime::Internal::MemoryBlock::size
size_t size
Definition memory_resources.h:67
Halide::Runtime::Internal::MemoryProperties
Definition memory_resources.h:56
Halide::Runtime::Internal::MemoryProperties::caching
MemoryCaching caching
Definition memory_resources.h:59
Halide::Runtime::Internal::MemoryProperties::alignment
size_t alignment
Definition memory_resources.h:60
Halide::Runtime::Internal::MemoryProperties::nearest_multiple
size_t nearest_multiple
Definition memory_resources.h:61
Halide::Runtime::Internal::MemoryProperties::visibility
MemoryVisibility visibility
Definition memory_resources.h:57
Halide::Runtime::Internal::MemoryProperties::usage
MemoryUsage usage
Definition memory_resources.h:58
Halide::Runtime::Internal::MemoryRange
Definition memory_resources.h:73
Halide::Runtime::Internal::MemoryRange::head_offset
size_t head_offset
Definition memory_resources.h:74
Halide::Runtime::Internal::MemoryRange::tail_offset
size_t tail_offset
Definition memory_resources.h:75
Halide::Runtime::Internal::MemoryRegionAllocatorFns
Definition memory_resources.h:217
Halide::Runtime::Internal::MemoryRegionAllocatorFns::deallocate
DeallocateRegionFn deallocate
Definition memory_resources.h:219
Halide::Runtime::Internal::MemoryRegionAllocatorFns::allocate
AllocateRegionFn allocate
Definition memory_resources.h:218
Halide::Runtime::Internal::MemoryRegionAllocatorFns::conform
ConformBlockRegionFn conform
Definition memory_resources.h:220
Halide::Runtime::Internal::MemoryRegion
Definition memory_resources.h:79
Halide::Runtime::Internal::MemoryRegion::handle
void * handle
Definition memory_resources.h:80
Halide::Runtime::Internal::MemoryRegion::dedicated
bool dedicated
Definition memory_resources.h:84
Halide::Runtime::Internal::MemoryRegion::is_owner
bool is_owner
Definition memory_resources.h:85
Halide::Runtime::Internal::MemoryRegion::size
size_t size
Definition memory_resources.h:82
Halide::Runtime::Internal::MemoryRegion::range
MemoryRange range
Definition memory_resources.h:83
Halide::Runtime::Internal::MemoryRegion::properties
MemoryProperties properties
Definition memory_resources.h:86
Halide::Runtime::Internal::MemoryRegion::offset
size_t offset
Definition memory_resources.h:81
Halide::Runtime::Internal::MemoryRequest
Definition memory_resources.h:90
Halide::Runtime::Internal::MemoryRequest::size
size_t size
Definition memory_resources.h:92
Halide::Runtime::Internal::MemoryRequest::offset
size_t offset
Definition memory_resources.h:91
Halide::Runtime::Internal::MemoryRequest::dedicated
bool dedicated
Definition memory_resources.h:94
Halide::Runtime::Internal::MemoryRequest::alignment
size_t alignment
Definition memory_resources.h:93
Halide::Runtime::Internal::MemoryRequest::properties
MemoryProperties properties
Definition memory_resources.h:95
Halide::Runtime::Internal::SystemMemoryAllocatorFns
Definition memory_resources.h:193
Halide::Runtime::Internal::SystemMemoryAllocatorFns::deallocate
DeallocateSystemFn deallocate
Definition memory_resources.h:195
Halide::Runtime::Internal::SystemMemoryAllocatorFns::allocate
AllocateSystemFn allocate
Definition memory_resources.h:194