Halide 22.0.0 Halide compiler and libraries

Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
Halide::Runtime::Internal Namespace Reference

## Namespaces
namespace | Constants
namespace | Cuda
namespace | Metal
namespace | Qurt
namespace | Synchronization
namespace | Vulkan

## Classes
class | BlockAllocator
| Allocator class interface for managing large contiguous blocks of memory, which are then sub-allocated into smaller regions of memory. More...
struct | BlockRegion
struct | BlockResource
class | BlockStorage
struct | CacheEntry
struct | CpuFeatures
struct | DefaultAllocatorFns
struct | device_copy
struct | halide_cond_with_spinning
struct | HalideSystemAllocatorFns
struct | HashMap
class | LinkedList
class | MemoryArena
struct | MemoryBlock
struct | MemoryBlockAllocatorFns
struct | MemoryProperties
struct | MemoryRange
struct | MemoryRegion
struct | MemoryRegionAllocatorFns
struct | MemoryRequest
class | PointerTable
class | PrinterBase
class | RegionAllocator
| Allocator class interface for sub-allocating a contiguous memory block into smaller regions of memory. More...
struct | ScopedMutexLock
struct | ScopedSpinLock
class | StringStorage
class | StringTable
struct | StringUtils
struct | SystemMemoryAllocatorFns
struct | THashMap
struct | work
struct | work_queue_t

## Typedefs
typedef void(* | copy_value_func) (uint8_t *dst, const uint8_t *src, size_t size)
typedef void(* | destroy_value_func) (uint8_t *value, size_t size)
typedef void *(* | AllocateSystemFn) (void *, size_t)
typedef void(* | DeallocateSystemFn) (void *, void *)
typedef int(* | AllocateBlockFn) (void *, MemoryBlock *)
typedef int(* | DeallocateBlockFn) (void *, MemoryBlock *)
typedef int(* | ConformBlockRequestFn) (void *, MemoryRequest *)
typedef int(* | AllocateRegionFn) (void *, MemoryRegion *)
typedef int(* | DeallocateRegionFn) (void *, MemoryRegion *)
typedef int(* | ConformBlockRegionFn) (void *, MemoryRequest *)

## Enumerations
enum class | AllocationStatus { InvalidStatus , InUse , Available , Purgeable , Dedicated }
enum class | MemoryVisibility { InvalidVisibility , HostOnly , DeviceOnly , DeviceToHost , HostToDevice , DefaultVisibility }
enum class | MemoryUsage { InvalidUsage , StaticStorage , DynamicStorage , UniformStorage , TransferSrc , TransferDst , TransferSrcDst , DefaultUsage }
enum class | MemoryCaching { InvalidCaching , Cached , Uncached , CachedCoherent , UncachedCoherent , DefaultCaching }
enum | PrinterType { BasicPrinterType = 0 , ErrorPrinterType = 1 , StringStreamPrinterType = 2 }

## Functions
ALWAYS_INLINE void | halide_set_known_cpu_feature (CpuFeatures *features, int i)
ALWAYS_INLINE void | halide_set_available_cpu_feature (CpuFeatures *features, int i)
ALWAYS_INLINE bool | halide_test_known_cpu_feature (CpuFeatures *features, int i)
ALWAYS_INLINE bool | halide_test_available_cpu_feature (CpuFeatures *features, int i)
WEAK int | halide_get_cpu_features (CpuFeatures *features)
WEAK void | copy_memory_helper (const device_copy &copy, int d, int64_t src_off, int64_t dst_off)
WEAK void | copy_memory (const device_copy &copy, void *user_context)
WEAK device_copy | make_buffer_copy (const halide_buffer_t *src, bool src_host, const halide_buffer_t *dst, bool dst_host)
WEAK device_copy | make_host_to_device_copy (const halide_buffer_t *buf)
WEAK device_copy | make_device_to_host_copy (const halide_buffer_t *buf)
ALWAYS_INLINE int64_t | calc_device_crop_byte_offset (const struct halide_buffer_t *src, struct halide_buffer_t *dst)
ALWAYS_INLINE int64_t | calc_device_slice_byte_offset (const struct halide_buffer_t *src, int slice_dim, int slice_pos)
template<typename Container >
bool | any_zero (const Container &c)
bool | keys_equal (const uint8_t *key1, const uint8_t *key2, size_t key_size)
uint32_t | djb_hash (const uint8_t *key, size_t key_size)
ALWAYS_INLINE bool | is_power_of_two_alignment (size_t x)
ALWAYS_INLINE size_t | aligned_offset (size_t offset, size_t alignment)
ALWAYS_INLINE size_t | conform_alignment (size_t requested, size_t required)
ALWAYS_INLINE size_t | aligned_size (size_t offset, size_t size, size_t alignment)
ALWAYS_INLINE size_t | conform_size (size_t offset, size_t size, size_t alignment, size_t nearest_multiple)
ALWAYS_INLINE size_t | clamped_size (size_t value, size_t min_value, size_t max_value)
ALWAYS_INLINE const void * | offset_address (const void *address, size_t byte_offset)
ALWAYS_INLINE void * | offset_address (void *address, size_t byte_offset)
ALWAYS_INLINE void * | native_system_malloc (void *user_context, size_t bytes)
ALWAYS_INLINE void | native_system_free (void *user_context, void *ptr)
WEAK objc_id | create_autorelease_pool ()
WEAK void | drain_autorelease_pool (objc_id pool)
WEAK void | retain_ns_object (objc_id obj)
WEAK void | release_ns_object (objc_id obj)
WEAK objc_id | wrap_string_as_ns_string (const char *string, size_t length)
size_t | strlen (const char *string)
WEAK void | ns_log_utf8_string (const char *string)
WEAK void | ns_log_object (objc_id obj)
ALWAYS_INLINE int | clamp_num_threads (int threads)
WEAK int | default_desired_num_threads ()
WEAK void | worker_thread (void *)
WEAK void | worker_thread_stall (work *owned_job)
WEAK void | worker_thread_idle ()
WEAK void | worker_thread_already_locked (work *owned_job)
WEAK void | enqueue_work_already_locked (int num_jobs, work *jobs, work *task_parent)
size_t | get_allocated_system_memory ()
void * | allocate_system (void *user_context, size_t bytes)
void | deallocate_system (void *user_context, void *aligned_ptr)

## Variables
constexpr uint64_t | default_printer_buffer_length = 1024
WEAK work_queue_t | work_queue = {}
WEAK halide_do_task_t | custom_do_task = halide_default_do_task
WEAK halide_do_loop_task_t | custom_do_loop_task = halide_default_do_loop_task
WEAK halide_do_par_for_t | custom_do_par_for = halide_default_do_par_for
WEAK halide_do_parallel_tasks_t | custom_do_parallel_tasks = halide_default_do_parallel_tasks
WEAK halide_semaphore_init_t | custom_semaphore_init = halide_default_semaphore_init
WEAK halide_semaphore_try_acquire_t | custom_semaphore_try_acquire = halide_default_semaphore_try_acquire
WEAK halide_semaphore_release_t | custom_semaphore_release = halide_default_semaphore_release

## Typedef Documentation

## ◆ copy_value_func

typedef void(* Halide::Runtime::Internal::copy_value_func) (uint8_t *dst, const uint8_t *src, size_t size)

Definition at line 38 of file hashmap.h.

## ◆ destroy_value_func

typedef void(* Halide::Runtime::Internal::destroy_value_func) (uint8_t *value, size_t size)

Definition at line 39 of file hashmap.h.

## ◆ AllocateSystemFn

typedef void *(* Halide::Runtime::Internal::AllocateSystemFn) (void *, size_t)

Definition at line 182 of file memory_resources.h.

## ◆ DeallocateSystemFn

typedef void(* Halide::Runtime::Internal::DeallocateSystemFn) (void *, void *)

Definition at line 183 of file memory_resources.h.

## ◆ AllocateBlockFn

typedef int(* Halide::Runtime::Internal::AllocateBlockFn) (void *, MemoryBlock *)

Definition at line 203 of file memory_resources.h.

## ◆ DeallocateBlockFn

typedef int(* Halide::Runtime::Internal::DeallocateBlockFn) (void *, MemoryBlock *)

Definition at line 204 of file memory_resources.h.

## ◆ ConformBlockRequestFn

typedef int(* Halide::Runtime::Internal::ConformBlockRequestFn) (void *, MemoryRequest *)

Definition at line 205 of file memory_resources.h.

## ◆ AllocateRegionFn

typedef int(* Halide::Runtime::Internal::AllocateRegionFn) (void *, MemoryRegion *)

Definition at line 213 of file memory_resources.h.

## ◆ DeallocateRegionFn

typedef int(* Halide::Runtime::Internal::DeallocateRegionFn) (void *, MemoryRegion *)

Definition at line 214 of file memory_resources.h.

## ◆ ConformBlockRegionFn

typedef int(* Halide::Runtime::Internal::ConformBlockRegionFn) (void *, MemoryRequest *)

Definition at line 215 of file memory_resources.h.

## Enumeration Type Documentation

## ◆ AllocationStatus

enum class Halide::Runtime::Internal::AllocationStatus
| strong

Enumerator
InvalidStatus |
InUse |
Available |
Purgeable |
Dedicated |

Definition at line 14 of file memory_resources.h.

## ◆ MemoryVisibility

enum class Halide::Runtime::Internal::MemoryVisibility
| strong

Enumerator
InvalidVisibility |
HostOnly |
DeviceOnly |
DeviceToHost |
HostToDevice |
DefaultVisibility |

Definition at line 24 of file memory_resources.h.

## ◆ MemoryUsage

enum class Halide::Runtime::Internal::MemoryUsage
| strong

Enumerator
InvalidUsage |
StaticStorage |
DynamicStorage |
UniformStorage |
TransferSrc |
TransferDst |
TransferSrcDst |
DefaultUsage |

Definition at line 35 of file memory_resources.h.

## ◆ MemoryCaching

enum class Halide::Runtime::Internal::MemoryCaching
| strong

Enumerator
InvalidCaching |
Cached |
Uncached |
CachedCoherent |
UncachedCoherent |
DefaultCaching |

Definition at line 47 of file memory_resources.h.

## ◆ PrinterType

enum Halide::Runtime::Internal::PrinterType

Enumerator
BasicPrinterType |
ErrorPrinterType |
StringStreamPrinterType |

Definition at line 21 of file printer.h.

## Function Documentation

## ◆ halide_set_known_cpu_feature()

ALWAYS_INLINE void Halide::Runtime::Internal::halide_set_known_cpu_feature | ( | CpuFeatures * | features,
|  | int | i
| ) |  |

Definition at line 23 of file cpu_features.h.

References Halide::cast(), and Halide::Runtime::Internal::CpuFeatures::known.

## ◆ halide_set_available_cpu_feature()

ALWAYS_INLINE void Halide::Runtime::Internal::halide_set_available_cpu_feature | ( | CpuFeatures * | features,
|  | int | i
| ) |  |

Definition at line 27 of file cpu_features.h.

References Halide::Runtime::Internal::CpuFeatures::available, and Halide::cast().

## ◆ halide_test_known_cpu_feature()

ALWAYS_INLINE bool Halide::Runtime::Internal::halide_test_known_cpu_feature | ( | CpuFeatures * | features,
|  | int | i
| ) |  |

Definition at line 31 of file cpu_features.h.

References Halide::cast(), and Halide::Runtime::Internal::CpuFeatures::known.

## ◆ halide_test_available_cpu_feature()

ALWAYS_INLINE bool Halide::Runtime::Internal::halide_test_available_cpu_feature | ( | CpuFeatures * | features,
|  | int | i
| ) |  |

Definition at line 35 of file cpu_features.h.

References Halide::Runtime::Internal::CpuFeatures::available, and Halide::cast().

## ◆ halide_get_cpu_features()

WEAK int Halide::Runtime::Internal::halide_get_cpu_features | ( | CpuFeatures * | features | ) |

## ◆ copy_memory_helper()

WEAK void Halide::Runtime::Internal::copy_memory_helper | ( | const device_copy & | copy,
|  | int | d,
|  | int64_t | src_off,
|  | int64_t | dst_off
| ) |  |

Definition at line 47 of file device_buffer_utils.h.

References Halide::cast(), Halide::Runtime::Internal::device_copy::chunk_size, copy_memory_helper(), Halide::Runtime::Internal::device_copy::dst, Halide::Runtime::Internal::device_copy::dst_stride_bytes, Halide::Runtime::Internal::device_copy::extent, MAX_COPY_DIMS, memcpy(), Halide::Runtime::Internal::device_copy::src, and Halide::Runtime::Internal::device_copy::src_stride_bytes.

Referenced by copy_memory(), and copy_memory_helper().

## ◆ copy_memory()

WEAK void Halide::Runtime::Internal::copy_memory | ( | const device_copy & | copy,
|  | void * | user_context
| ) |  |

Definition at line 70 of file device_buffer_utils.h.

References copy_memory_helper(), debug, Halide::Runtime::Internal::device_copy::dst, Halide::Runtime::Internal::device_copy::dst_begin, MAX_COPY_DIMS, Halide::Runtime::Internal::device_copy::src, Halide::Runtime::Internal::device_copy::src_begin, and user_context.

## ◆ make_buffer_copy()

WEAK device_copy Halide::Runtime::Internal::make_buffer_copy | ( | const halide_buffer_t * | src,
|  | bool | src_host,
|  | const halide_buffer_t * | dst,
|  | bool | dst_host
| ) |  |

Definition at line 85 of file device_buffer_utils.h.

References Halide::cast(), Halide::Runtime::Internal::device_copy::chunk_size, halide_buffer_t::device, halide_buffer_t::dim, halide_buffer_t::dimensions, Halide::Runtime::Internal::device_copy::dst, Halide::Runtime::Internal::device_copy::dst_begin, Halide::Runtime::Internal::device_copy::dst_stride_bytes, Halide::Runtime::Internal::device_copy::extent, halide_dimension_t::extent, halide_buffer_t::host, MAX_COPY_DIMS, halide_dimension_t::min, Halide::Runtime::Internal::device_copy::src, Halide::Runtime::Internal::device_copy::src_begin, Halide::Runtime::Internal::device_copy::src_stride_bytes, halide_dimension_t::stride, and halide_buffer_t::type.

Referenced by make_device_to_host_copy(), and make_host_to_device_copy().

## ◆ make_host_to_device_copy()

WEAK device_copy Halide::Runtime::Internal::make_host_to_device_copy | ( | const halide_buffer_t * | buf | ) |

Definition at line 180 of file device_buffer_utils.h.

References make_buffer_copy().

## ◆ make_device_to_host_copy()

WEAK device_copy Halide::Runtime::Internal::make_device_to_host_copy | ( | const halide_buffer_t * | buf | ) |

Definition at line 184 of file device_buffer_utils.h.

References make_buffer_copy().

## ◆ calc_device_crop_byte_offset()

ALWAYS_INLINE int64_t Halide::Runtime::Internal::calc_device_crop_byte_offset | ( | const struct halide_buffer_t * | src,
|  | struct halide_buffer_t * | dst
| ) |  |

Definition at line 189 of file device_buffer_utils.h.

References Halide::cast(), halide_buffer_t::dim, halide_buffer_t::dimensions, halide_dimension_t::min, halide_dimension_t::stride, and halide_buffer_t::type.

## ◆ calc_device_slice_byte_offset()

ALWAYS_INLINE int64_t Halide::Runtime::Internal::calc_device_slice_byte_offset | ( | const struct halide_buffer_t * | src,
|  | int | slice_dim,
|  | int | slice_pos
| ) |  |

Definition at line 200 of file device_buffer_utils.h.

References Halide::cast(), halide_buffer_t::dim, halide_dimension_t::min, halide_dimension_t::stride, and halide_buffer_t::type.

## ◆ any_zero()

template<typename Container >

bool Halide::Runtime::Internal::any_zero | ( | const Container & | c | ) |

Definition at line 149 of file HalideBuffer.h.

References Halide::cast().

Referenced by Halide::Runtime::Buffer< T, Dims, InClassDimStorage >::Buffer(), Halide::Runtime::Buffer< T, Dims, InClassDimStorage >::Buffer(), and Halide::Runtime::Buffer< T, Dims, InClassDimStorage >::Buffer().

## ◆ keys_equal()

bool Halide::Runtime::Internal::keys_equal | ( | const uint8_t * | key1,
|  | const uint8_t * | key2,
|  | size_t | key_size
| ) |  |
| inline

Definition at line 26 of file hashmap.h.

References Halide::cast(), and memcmp().

Referenced by Halide::Runtime::Internal::HashMap::lookup(), and Halide::Runtime::Internal::HashMap::store().

## ◆ djb_hash()

uint32_t Halide::Runtime::Internal::djb_hash | ( | const uint8_t * | key,
|  | size_t | key_size
| ) |  |
| inline

Definition at line 30 of file hashmap.h.

References Halide::cast().

Referenced by Halide::Runtime::Internal::HashMap::lookup(), and Halide::Runtime::Internal::HashMap::store().

## ◆ is_power_of_two_alignment()

ALWAYS_INLINE bool Halide::Runtime::Internal::is_power_of_two_alignment | ( | size_t | x | ) |

Definition at line 122 of file memory_resources.h.

Referenced by aligned_offset().

## ◆ aligned_offset()

ALWAYS_INLINE size_t Halide::Runtime::Internal::aligned_offset | ( | size_t | offset,
|  | size_t | alignment
| ) |  |

Definition at line 128 of file memory_resources.h.

References halide_abort_if_false, and is_power_of_two_alignment().

Referenced by aligned_size(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::conform(), and Halide::Runtime::Internal::RegionAllocator::conform().

## ◆ conform_alignment()

ALWAYS_INLINE size_t Halide::Runtime::Internal::conform_alignment | ( | size_t | requested,
|  | size_t | required
| ) |  |

Definition at line 135 of file memory_resources.h.

References Halide::cast().

Referenced by Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::conform(), and Halide::Runtime::Internal::RegionAllocator::conform().

## ◆ aligned_size()

ALWAYS_INLINE size_t Halide::Runtime::Internal::aligned_size | ( | size_t | offset,
|  | size_t | size,
|  | size_t | alignment
| ) |  |

Definition at line 142 of file memory_resources.h.

References aligned_offset(), and Halide::cast().

Referenced by conform_size().

## ◆ conform_size()

ALWAYS_INLINE size_t Halide::Runtime::Internal::conform_size | ( | size_t | offset,
|  | size_t | size,
|  | size_t | alignment,
|  | size_t | nearest_multiple
| ) |  |

Definition at line 151 of file memory_resources.h.

References aligned_size(), and Halide::cast().

Referenced by Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::conform(), and Halide::Runtime::Internal::RegionAllocator::conform().

## ◆ clamped_size()

ALWAYS_INLINE size_t Halide::Runtime::Internal::clamped_size | ( | size_t | value,
|  | size_t | min_value,
|  | size_t | max_value
| ) |  |

Definition at line 163 of file memory_resources.h.

## ◆ offset_address() [1/2]

ALWAYS_INLINE const void * Halide::Runtime::Internal::offset_address | ( | const void * | address,
|  | size_t | byte_offset
| ) |  |

Definition at line 169 of file memory_resources.h.

References Halide::cast().

Referenced by Halide::Runtime::Internal::BlockStorage::back(), Halide::Runtime::Internal::BlockStorage::back(), Halide::Runtime::Internal::BlockStorage::insert(), Halide::Runtime::Internal::BlockStorage::operator[](), Halide::Runtime::Internal::BlockStorage::operator[](), Halide::Runtime::Internal::MemoryArena::reclaim(), Halide::Runtime::Internal::BlockStorage::remove(), and Halide::Runtime::Internal::BlockStorage::replace().

## ◆ offset_address() [2/2]

ALWAYS_INLINE void * Halide::Runtime::Internal::offset_address | ( | void * | address,
|  | size_t | byte_offset
| ) |  |

Definition at line 175 of file memory_resources.h.

References Halide::cast().

## ◆ native_system_malloc()

ALWAYS_INLINE void * Halide::Runtime::Internal::native_system_malloc | ( | void * | user_context,
|  | size_t | bytes
| ) |  |

Definition at line 185 of file memory_resources.h.

References malloc().

Referenced by Halide::Runtime::Internal::BlockStorage::default_allocator(), and Halide::Runtime::Internal::PointerTable::default_allocator().

## ◆ native_system_free()

ALWAYS_INLINE void Halide::Runtime::Internal::native_system_free | ( | void * | user_context,
|  | void * | ptr
| ) |  |

Definition at line 189 of file memory_resources.h.

References free().

Referenced by Halide::Runtime::Internal::BlockStorage::default_allocator(), and Halide::Runtime::Internal::PointerTable::default_allocator().

## ◆ create_autorelease_pool()

WEAK objc_id Halide::Runtime::Internal::create_autorelease_pool | ( |  | ) |

Definition at line 42 of file objc_support.h.

References Halide::cast(), objc_getClass(), objc_msgSend(), and sel_getUid().

## ◆ drain_autorelease_pool()

WEAK void Halide::Runtime::Internal::drain_autorelease_pool | ( | objc_id | pool | ) |

Definition at line 50 of file objc_support.h.

References Halide::cast(), objc_msgSend(), and sel_getUid().

## ◆ retain_ns_object()

WEAK void Halide::Runtime::Internal::retain_ns_object | ( | objc_id | obj | ) |

Definition at line 56 of file objc_support.h.

References Halide::cast(), objc_msgSend(), and sel_getUid().

## ◆ release_ns_object()

WEAK void Halide::Runtime::Internal::release_ns_object | ( | objc_id | obj | ) |

Definition at line 62 of file objc_support.h.

References Halide::cast(), objc_msgSend(), and sel_getUid().

Referenced by ns_log_object(), and ns_log_utf8_string().

## ◆ wrap_string_as_ns_string()

WEAK objc_id Halide::Runtime::Internal::wrap_string_as_ns_string | ( | const char * | string,
|  | size_t | length
| ) |  |

Definition at line 68 of file objc_support.h.

References Halide::cast(), objc_getClass(), objc_msgSend(), and sel_getUid().

Referenced by ns_log_object(), and ns_log_utf8_string().

## ◆ strlen()

size_t Halide::Runtime::Internal::strlen | ( | const char * | string | ) |

Referenced by Halide::Runtime::Internal::StringStorage::append(), Halide::Runtime::Internal::StringStorage::assign(), Halide::Runtime::Internal::StringTable::assign(), Halide::Runtime::Internal::StringUtils::contains(), Halide::Runtime::Internal::StringUtils::count_tokens(), ns_log_utf8_string(), Halide::Runtime::Internal::StringTable::parse(), and Halide::Runtime::Internal::StringStorage::prepend().

## ◆ ns_log_utf8_string()

WEAK void Halide::Runtime::Internal::ns_log_utf8_string | ( | const char * | string | ) |

Definition at line 80 of file objc_support.h.

References Halide::cast(), NSLog(), release_ns_object(), strlen(), and wrap_string_as_ns_string().

## ◆ ns_log_object()

WEAK void Halide::Runtime::Internal::ns_log_object | ( | objc_id | obj | ) |

Definition at line 88 of file objc_support.h.

References Halide::cast(), NSLog(), release_ns_object(), and wrap_string_as_ns_string().

## ◆ clamp_num_threads()

ALWAYS_INLINE int Halide::Runtime::Internal::clamp_num_threads | ( | int | threads | ) |

Definition at line 125 of file thread_pool_common.h.

References Halide::cast().

Referenced by enqueue_work_already_locked(), and halide_set_num_threads().

## ◆ default_desired_num_threads()

WEAK int Halide::Runtime::Internal::default_desired_num_threads | ( |  | ) |

Definition at line 135 of file thread_pool_common.h.

References atoi(), Halide::cast(), getenv(), and halide_host_cpu_count().

Referenced by enqueue_work_already_locked(), and halide_set_num_threads().

## ◆ worker_thread()

WEAK void Halide::Runtime::Internal::worker_thread | ( | void * | arg | ) |

Definition at line 485 of file thread_pool_common.h.

References halide_mutex_lock(), halide_mutex_unlock(), Halide::Runtime::Internal::work_queue_t::mutex, work_queue, and worker_thread_already_locked().

Referenced by enqueue_work_already_locked().

## ◆ worker_thread_stall()

WEAK void Halide::Runtime::Internal::worker_thread_stall | ( | work * | owned_job | ) |

Definition at line 256 of file thread_pool_common.h.

References Halide::cast(), Halide::Runtime::Internal::work_queue_t::mutex, Halide::Runtime::Internal::work_queue_t::owners_sleeping, Halide::Runtime::Internal::halide_cond_with_spinning::wait(), Halide::Runtime::Internal::work_queue_t::wake_owners, and work_queue.

Referenced by worker_thread_already_locked().

## ◆ worker_thread_idle()

WEAK void Halide::Runtime::Internal::worker_thread_idle | ( |  | ) |

Definition at line 264 of file thread_pool_common.h.

References Halide::Runtime::Internal::work_queue_t::a_team_size, Halide::Runtime::Internal::work_queue_t::mutex, Halide::Runtime::Internal::work_queue_t::target_a_team_size, Halide::Runtime::Internal::halide_cond_with_spinning::wait(), Halide::Runtime::Internal::work_queue_t::wake_a_team, Halide::Runtime::Internal::work_queue_t::wake_b_team, work_queue, and Halide::Runtime::Internal::work_queue_t::workers_sleeping.

Referenced by worker_thread_already_locked().

## ◆ worker_thread_already_locked()

WEAK void Halide::Runtime::Internal::worker_thread_already_locked | ( | work * | owned_job | ) |

Definition at line 277 of file thread_pool_common.h.

References Halide::Runtime::Internal::work::active_workers, Halide::Runtime::Internal::halide_cond_with_spinning::broadcast(), Halide::cast(), dump_job_state, halide_do_loop_task(), halide_do_task(), halide_error_code_success, halide_mutex_lock(), halide_mutex_unlock(), Halide::Runtime::Internal::work_queue_t::jobs, log_message, Halide::Internal::ConstantInterval::min, halide_parallel_task_t::min_threads, Halide::Runtime::Internal::work_queue_t::mutex, print_job, Halide::Runtime::Internal::work_queue_t::shutdown, Halide::Runtime::Internal::work::task, Halide::Runtime::Internal::work_queue_t::threads_created, Halide::Runtime::Internal::work::threads_reserved, Halide::Runtime::Internal::work_queue_t::threads_reserved, Halide::Runtime::Internal::work_queue_t::wake_owners, work_queue, worker_thread_idle(), and worker_thread_stall().

Referenced by halide_default_do_par_for(), halide_default_do_parallel_tasks(), and worker_thread().

## ◆ enqueue_work_already_locked()

WEAK void Halide::Runtime::Internal::enqueue_work_already_locked | ( | int | num_jobs,
|  | work * | jobs,
|  | work * | task_parent
| ) |  |

Definition at line 491 of file thread_pool_common.h.

References Halide::Runtime::Internal::work_queue_t::a_team_size, Halide::Runtime::Internal::work_queue_t::assert_zeroed(), Halide::Runtime::Internal::halide_cond_with_spinning::broadcast(), Halide::cast(), clamp_num_threads(), default_desired_num_threads(), Halide::Runtime::Internal::work_queue_t::desired_threads_working, halide_parallel_task_t::extent, halide_abort_if_false, halide_spawn_thread(), Halide::Runtime::Internal::work_queue_t::initialized, Halide::Runtime::Internal::work_queue_t::jobs, log_message, halide_parallel_task_t::min_threads, Halide::Runtime::Internal::work::next_job, Halide::Runtime::Internal::work_queue_t::owners_sleeping, Halide::Runtime::Internal::work::sibling_count, Halide::Runtime::Internal::work::siblings, Halide::Runtime::Internal::work_queue_t::target_a_team_size, Halide::Runtime::Internal::work::task, Halide::Runtime::Internal::work_queue_t::threads, Halide::Runtime::Internal::work_queue_t::threads_created, Halide::Runtime::Internal::work::threads_reserved, Halide::Runtime::Internal::work_queue_t::threads_reserved, Halide::Runtime::Internal::work_queue_t::wake_a_team, Halide::Runtime::Internal::work_queue_t::wake_b_team, Halide::Runtime::Internal::work_queue_t::wake_owners, work_queue, worker_thread(), and Halide::Runtime::Internal::work_queue_t::workers_sleeping.

Referenced by halide_default_do_par_for(), and halide_default_do_parallel_tasks().

## ◆ get_allocated_system_memory()

size_t Halide::Runtime::Internal::get_allocated_system_memory | ( |  | ) |

## ◆ allocate_system()

void * Halide::Runtime::Internal::allocate_system | ( | void * | user_context,
|  | size_t | bytes
| ) |  |

## ◆ deallocate_system()

void Halide::Runtime::Internal::deallocate_system | ( | void * | user_context,
|  | void * | aligned_ptr
| ) |  |

## Variable Documentation

## ◆ default_printer_buffer_length

constexpr uint64_t Halide::Runtime::Internal::default_printer_buffer_length = 1024
| constexpr

Definition at line 25 of file printer.h.

## ◆ work_queue

WEAK work_queue_t Halide::Runtime::Internal::work_queue = {}

Definition at line 219 of file thread_pool_common.h.

Referenced by enqueue_work_already_locked(), halide_default_do_par_for(), halide_default_do_parallel_tasks(), halide_default_semaphore_release(), halide_get_num_threads(), halide_set_num_threads(), halide_shutdown_thread_pool(), worker_thread(), worker_thread_already_locked(), worker_thread_idle(), and worker_thread_stall().

## ◆ custom_do_task

WEAK halide_do_task_t Halide::Runtime::Internal::custom_do_task = halide_default_do_task

Definition at line 619 of file thread_pool_common.h.

Referenced by halide_do_task(), halide_set_custom_do_task(), and halide_set_custom_parallel_runtime().

## ◆ custom_do_loop_task

WEAK halide_do_loop_task_t Halide::Runtime::Internal::custom_do_loop_task = halide_default_do_loop_task

Definition at line 620 of file thread_pool_common.h.

Referenced by halide_do_loop_task(), halide_set_custom_do_loop_task(), and halide_set_custom_parallel_runtime().

## ◆ custom_do_par_for

WEAK halide_do_par_for_t Halide::Runtime::Internal::custom_do_par_for = halide_default_do_par_for

Definition at line 621 of file thread_pool_common.h.

Referenced by halide_do_par_for(), halide_set_custom_do_par_for(), and halide_set_custom_parallel_runtime().

## ◆ custom_do_parallel_tasks

WEAK halide_do_parallel_tasks_t Halide::Runtime::Internal::custom_do_parallel_tasks = halide_default_do_parallel_tasks

Definition at line 622 of file thread_pool_common.h.

Referenced by halide_do_parallel_tasks(), and halide_set_custom_parallel_runtime().

## ◆ custom_semaphore_init

WEAK halide_semaphore_init_t Halide::Runtime::Internal::custom_semaphore_init = halide_default_semaphore_init

Definition at line 623 of file thread_pool_common.h.

Referenced by halide_semaphore_init(), and halide_set_custom_parallel_runtime().

## ◆ custom_semaphore_try_acquire

WEAK halide_semaphore_try_acquire_t Halide::Runtime::Internal::custom_semaphore_try_acquire = halide_default_semaphore_try_acquire

Definition at line 624 of file thread_pool_common.h.

Referenced by halide_semaphore_try_acquire(), and halide_set_custom_parallel_runtime().

## ◆ custom_semaphore_release

WEAK halide_semaphore_release_t Halide::Runtime::Internal::custom_semaphore_release = halide_default_semaphore_release

Definition at line 625 of file thread_pool_common.h.

Referenced by halide_semaphore_release(), and halide_set_custom_parallel_runtime().