Loading...
Searching...
No Matches
runtime_internal.h File Reference

Go to the source code of this file.

## Classes

struct | halide_pseudostack_slot_t

## Namespaces

namespace | Halide
| This file defines the class FunctionDAG, which is our representation of a Halide pipeline, and contains methods to using Halide's bounds tools to query properties of it.
namespace | Halide::Runtime
namespace | Halide::Runtime::Internal

## Macros

#define | WEAK __attribute__((weak))
#define | NEVER_INLINE __attribute__((noinline))
#define | ALWAYS_INLINE inline __attribute__((always_inline))
#define | WEAK_INLINE __attribute__((weak, always_inline))
#define | STDOUT_FILENO 1
#define | STDERR_FILENO 2
#define | _halide_stringify(x)
| halide_abort_if_false() is a macro that calls halide_print if the supplied condition is false, then aborts.
#define | _halide_expand_and_stringify(x)
#define | halide_abort_if_false(user_context, cond)
#define | halide_debug_assert(user_context, cond)
| halide_debug_assert() is like halide_assert(), but only expands into a check when DEBUG_RUNTIME is defined.

## Typedefs

typedef signed __INT64_TYPE__ | int64_t
typedef unsigned __INT64_TYPE__ | uint64_t
typedef signed __INT32_TYPE__ | int32_t
typedef unsigned __INT32_TYPE__ | uint32_t
typedef signed __INT16_TYPE__ | int16_t
typedef unsigned __INT16_TYPE__ | uint16_t
typedef signed __INT8_TYPE__ | int8_t
typedef unsigned __INT8_TYPE__ | uint8_t
typedef __SIZE_TYPE__ | size_t
typedef __PTRDIFF_TYPE__ | ptrdiff_t
typedef ptrdiff_t | ssize_t
typedef __UINTPTR_TYPE__ | uintptr_t
typedef __INTPTR_TYPE__ | intptr_t

## Functions

void * | halide_malloc (void *user_context, size_t x)
void | halide_free (void *user_context, void *ptr)
WEAK int64_t | halide_current_time_ns (void *user_context)
WEAK void | halide_print (void *user_context, const char *msg)
WEAK void | halide_error (void *user_context, const char *msg)
char * | getenv (const char *)
void | free (void *)
void * | malloc (size_t)
const char * | strstr (const char *, const char *)
int | atoi (const char *)
int | strcmp (const char *s, const char *t)
int | strncmp (const char *s, const char *t, size_t n)
size_t | strlen (const char *s)
const char * | strchr (const char *s, int c)
void * | memcpy (void *s1, const void *s2, size_t n)
void * | memmove (void *dest, const void *src, size_t n)
int | memcmp (const void *s1, const void *s2, size_t n)
void * | memset (void *s, int val, size_t n)
WEAK_INLINE void * | halide_fopen (const char *filename, const char *type)
int | fileno (void *)
int | fclose (void *)
int | close (int)
size_t | fwrite (const void *, size_t, size_t, void *)
ssize_t | write (int fd, const void *buf, size_t bytes)
int | remove (const char *pathname)
int | ioctl (int fd, unsigned long request,...)
char * | strncpy (char *dst, const char *src, size_t n)
void | abort ()
WEAK char * | halide_string_to_string (char *dst, char *end, const char *arg)
WEAK char * | halide_double_to_string (char *dst, char *end, double arg, int scientific)
WEAK char * | halide_int64_to_string (char *dst, char *end, int64_t arg, int digits)
WEAK char * | halide_uint64_to_string (char *dst, char *end, uint64_t arg, int digits)
WEAK char * | halide_pointer_to_string (char *dst, char *end, const void *arg)
WEAK char * | halide_buffer_to_string (char *dst, char *end, const halide_buffer_t *arg)
WEAK char * | halide_type_to_string (char *dst, char *end, const halide_type_t *arg)
WEAK void * | halide_get_symbol (const char *name)
WEAK void * | halide_load_library (const char *name)
WEAK void * | halide_get_library_symbol (void *lib, const char *name)
WEAK int | halide_start_clock (void *user_context)
WEAK void | halide_sleep_us (void *user_context, int us)
WEAK void | halide_device_free_as_destructor (void *user_context, void *obj)
WEAK void | halide_device_and_host_free_as_destructor (void *user_context, void *obj)
WEAK void | halide_device_host_nop_free (void *user_context, void *obj)
WEAK void | halide_profiler_stack_peak_update (void *user_context, halide_profiler_instance_state *instance, uint64_t *f_values)
WEAK void | halide_profiler_memory_allocate (void *user_context, halide_profiler_instance_state *instance, int func_id, uint64_t incr)
WEAK void | halide_profiler_memory_free (void *user_context, halide_profiler_instance_state *instance, int func_id, uint64_t decr)
WEAK int | halide_profiler_instance_start (void *user_context, const char *pipeline_name, int num_funcs, const uint64_t *func_names, halide_profiler_instance_state *instance)
WEAK int | halide_profiler_instance_end (void *user_context, halide_profiler_instance_state *instance)
WEAK void | halide_start_timer_chain ()
WEAK void | halide_disable_timer_interrupt ()
WEAK void | halide_enable_timer_interrupt ()
WEAK int | halide_host_cpu_count ()
WEAK int | halide_device_and_host_malloc (void *user_context, struct halide_buffer_t *buf, const struct halide_device_interface_t *device_interface)
WEAK int | halide_device_and_host_free (void *user_context, struct halide_buffer_t *buf)
WEAK int | halide_trace_helper (void *user_context, const char *func, void *value, int *coords, int type_code, int type_bits, int type_lanes, int code, int parent_id, int value_index, int dimensions, const char *trace_tag)
WEAK void | halide_use_jit_module ()
WEAK void | halide_release_jit_module ()
WEAK_INLINE int | halide_internal_malloc_alignment ()
WEAK_INLINE void * | halide_internal_aligned_alloc (size_t alignment, size_t size)
WEAK_INLINE void | halide_internal_aligned_free (void *ptr)
void | halide_thread_yield ()
template<typename T>
ALWAYS_INLINE T | align_up (T p, size_t alignment)
template<typename T>
ALWAYS_INLINE T | is_power_of_two (T value)

## Variables

WEAK void(*)(void *, const char *) | halide_set_custom_print (void(*print)(void *, const char *))
WEAK void(*)(void *, const char *) | halide_set_error_handler (void(*handler)(void *, const char *))

## Macro Definition Documentation

## WEAK

#define WEAK __attribute__((weak))

Definition at line 52 of file runtime_internal.h.

Referenced by Halide::Runtime::Internal::copy_memory(), Halide::Runtime::Internal::copy_memory_helper(), Halide::Runtime::Internal::create_autorelease_pool(), Halide::Runtime::Internal::default_desired_num_threads(), Halide::Runtime::Internal::drain_autorelease_pool(), Halide::Runtime::Internal::enqueue_work_already_locked(), halide_buffer_to_string(), halide_cond_broadcast(), halide_cond_signal(), halide_cond_wait(), halide_current_time_ns(), halide_default_buffer_copy(), halide_default_device_and_host_free(), halide_default_device_and_host_malloc(), halide_default_device_crop(), halide_default_device_detach_native(), halide_default_device_release_crop(), halide_default_device_slice(), halide_default_device_wrap_native(), halide_default_do_loop_task(), halide_default_do_par_for(), halide_default_do_parallel_tasks(), halide_default_do_task(), halide_default_semaphore_init(), halide_default_semaphore_release(), halide_default_semaphore_try_acquire(), halide_device_and_host_free(), halide_device_and_host_free_as_destructor(), halide_device_and_host_malloc(), halide_device_free_as_destructor(), halide_device_host_nop_free(), halide_disable_timer_interrupt(), halide_do_loop_task(), halide_do_par_for(), halide_do_parallel_tasks(), halide_do_task(), halide_double_to_string(), halide_enable_timer_interrupt(), halide_error(), Halide::Runtime::Internal::halide_get_cpu_features(), halide_get_library_symbol(), halide_get_num_threads(), halide_get_symbol(), halide_hexagon_allocate_dma_resource(), halide_hexagon_allocate_from_dma_pool(), halide_hexagon_allocate_l2_pool(), halide_hexagon_free_dma_resource(), halide_hexagon_free_l2_pool(), halide_hexagon_free_to_dma_pool(), halide_host_cpu_count(), halide_int64_to_string(), halide_load_library(), halide_locked_cache_free(), halide_locked_cache_malloc(), halide_memory_caching_name(), halide_memory_usage_name(), halide_memory_visibility_name(), halide_mutex_array_create(), halide_mutex_array_destroy(), halide_mutex_array_lock(), halide_mutex_array_unlock(), halide_mutex_lock(), halide_mutex_unlock(), halide_pointer_to_string(), halide_print(), halide_profiler_instance_end(), halide_profiler_instance_start(), halide_profiler_memory_allocate(), halide_profiler_memory_free(), halide_profiler_stack_peak_update(), halide_release_jit_module(), halide_semaphore_init(), halide_semaphore_release(), halide_semaphore_try_acquire(), halide_set_custom_do_loop_task(), halide_set_custom_do_par_for(), halide_set_custom_do_task(), halide_set_custom_parallel_runtime(), halide_set_num_threads(), halide_shutdown_thread_pool(), halide_sleep_us(), halide_start_clock(), halide_start_timer_chain(), halide_string_to_string(), halide_trace_helper(), halide_type_to_string(), halide_uint64_to_string(), halide_use_jit_module(), halide_vulkan_get_alloc_config(), halide_vulkan_get_allocation_callbacks(), halide_vulkan_get_build_options(), halide_vulkan_get_device_type(), halide_vulkan_get_extension_names(), halide_vulkan_get_layer_names(), Halide::Runtime::Internal::Vulkan::halide_vulkan_get_symbol(), halide_vulkan_set_alloc_config(), halide_vulkan_set_allocation_callbacks(), halide_vulkan_set_build_options(), halide_vulkan_set_device_type(), halide_vulkan_set_extension_names(), halide_vulkan_set_layer_names(), Halide::Runtime::Internal::Synchronization::lock_bucket(), Halide::Runtime::Internal::Synchronization::lock_bucket_pair(), Halide::Runtime::Internal::make_buffer_copy(), Halide::Runtime::Internal::make_device_to_host_copy(), Halide::Runtime::Internal::make_host_to_device_copy(), Halide::Runtime::Internal::ns_log_object(), Halide::Runtime::Internal::ns_log_utf8_string(), Halide::Runtime::Internal::Synchronization::parking_control::park(), Halide::Runtime::Internal::release_ns_object(), Halide::Runtime::Internal::retain_ns_object(), Halide::Runtime::Internal::Synchronization::unlock_bucket_pair(), Halide::Runtime::Internal::Synchronization::parking_control::unpark_one(), Halide::Runtime::Internal::Synchronization::parking_control::unpark_requeue(), Halide::Runtime::Internal::Vulkan::vk_load_vulkan_device_functions(), Halide::Runtime::Internal::Vulkan::vk_load_vulkan_instance_functions(), Halide::Runtime::Internal::Vulkan::vk_load_vulkan_loader_functions(), Halide::Runtime::Internal::Vulkan::vk_unload_vulkan_device_functions(), Halide::Runtime::Internal::Vulkan::vk_unload_vulkan_instance_functions(), Halide::Runtime::Internal::worker_thread(), Halide::Runtime::Internal::worker_thread_already_locked(), Halide::Runtime::Internal::worker_thread_idle(), Halide::Runtime::Internal::worker_thread_stall(), and Halide::Runtime::Internal::wrap_string_as_ns_string().

## NEVER_INLINE

#define NEVER_INLINE __attribute__((noinline))

Definition at line 54 of file runtime_internal.h.

Referenced by Halide::Runtime::Internal::PrinterBase::allocation_error(), Halide::Runtime::Internal::PrinterBase::clear(), Halide::Runtime::Internal::PrinterBase::erase(), Halide::Runtime::Internal::PrinterBase::operator<<(), Halide::Runtime::Internal::PrinterBase::operator<<(), Halide::Runtime::Internal::PrinterBase::operator<<(), Halide::Runtime::Internal::PrinterBase::operator<<(), Halide::Runtime::Internal::PrinterBase::operator<<(), Halide::Runtime::Internal::PrinterBase::operator<<(), Halide::Runtime::Internal::PrinterBase::operator<<(), Halide::Runtime::Internal::PrinterBase::operator<<(), Halide::Runtime::Internal::PrinterBase::operator<<(), Halide::Runtime::Internal::PrinterBase::operator<<(), Halide::Runtime::Internal::PrinterBase::operator<<(), Halide::Runtime::Internal::PrinterBase::PrinterBase(), and Halide::Runtime::Internal::PrinterBase::str().

## ALWAYS_INLINE

#define ALWAYS_INLINE inline __attribute__((always_inline))

Definition at line 57 of file runtime_internal.h.

Referenced by align_up(), Halide::Runtime::Internal::aligned_offset(), Halide::Runtime::Internal::aligned_size(), Halide::Runtime::Internal::work_queue_t::assert_zeroed(), Halide::Runtime::Internal::Synchronization::fast_cond::broadcast(), Halide::Runtime::Internal::Synchronization::broadcast_parking_control::broadcast_parking_control(), Halide::Runtime::Internal::Synchronization::bucket_pair::bucket_pair(), Halide::Runtime::Internal::calc_device_crop_byte_offset(), Halide::Runtime::Internal::calc_device_slice_byte_offset(), Halide::Runtime::Internal::clamp_num_threads(), Halide::Runtime::Internal::clamped_size(), Halide::Runtime::Internal::conform_alignment(), Halide::Runtime::Internal::conform_size(), Halide::Runtime::Internal::halide_set_available_cpu_feature(), Halide::Runtime::Internal::halide_set_known_cpu_feature(), Halide::Runtime::Internal::halide_test_available_cpu_feature(), Halide::Runtime::Internal::halide_test_known_cpu_feature(), is_power_of_two(), Halide::Runtime::Internal::is_power_of_two_alignment(), Halide::Runtime::Internal::Synchronization::fast_mutex::lock(), Halide::Runtime::Internal::Synchronization::word_lock::lock(), Halide::Runtime::Internal::Synchronization::fast_mutex::make_parked(), Halide::Runtime::Internal::Synchronization::fast_mutex::make_parked_if_locked(), Halide::Runtime::Internal::work::make_runnable(), Halide::Runtime::Internal::Synchronization::mutex_parking_control::mutex_parking_control(), Halide::Runtime::Internal::native_system_free(), Halide::Runtime::Internal::native_system_malloc(), Halide::Runtime::Internal::offset_address(), Halide::Runtime::Internal::offset_address(), Halide::Runtime::Internal::Synchronization::spin_control::reset(), Halide::Runtime::Internal::work_queue_t::reset(), Halide::Runtime::Internal::work::running(), Halide::Runtime::Internal::work_queue_t::running(), Halide::Runtime::Internal::ScopedMutexLock::ScopedMutexLock(), Halide::Runtime::Internal::ScopedSpinLock::ScopedSpinLock(), Halide::Runtime::Internal::Synchronization::spin_control::should_spin(), Halide::Runtime::Internal::Synchronization::fast_cond::signal(), Halide::Runtime::Internal::Synchronization::signal_parking_control::signal_parking_control(), Halide::Runtime::Internal::Synchronization::fast_mutex::unlock(), Halide::Runtime::Internal::Synchronization::word_lock::unlock(), Halide::Runtime::Internal::Synchronization::fast_cond::wait(), Halide::Runtime::Internal::Synchronization::wait_parking_control::wait_parking_control(), Halide::Runtime::Internal::ScopedMutexLock::~ScopedMutexLock(), and Halide::Runtime::Internal::ScopedSpinLock::~ScopedSpinLock().

## WEAK_INLINE

#define WEAK_INLINE __attribute__((weak, always_inline))

Definition at line 60 of file runtime_internal.h.

Referenced by halide_fopen(), halide_internal_aligned_alloc(), halide_internal_aligned_free(), and halide_internal_malloc_alignment().

## STDOUT_FILENO

#define STDOUT_FILENO 1

Definition at line 81 of file runtime_internal.h.

## STDERR_FILENO

#define STDERR_FILENO 2

Definition at line 82 of file runtime_internal.h.

## _halide_stringify

#define _halide_stringify | ( |  | x | ) |

Value:
#x

halide_abort_if_false() is a macro that calls halide_print if the supplied condition is false, then aborts.

Used for unrecoverable errors, or should-never-happen errors.

Note that this is NOT a debug-only macro; the condition will be checked in all build modes!

Definition at line 269 of file runtime_internal.h.

## _halide_expand_and_stringify

#define _halide_expand_and_stringify | ( |  | x | ) |

Value:
_halide_stringify(x)
_halide_stringify
#define _halide_stringify(x)
halide_abort_if_false() is a macro that calls halide_print if the supplied condition is false,...
Definition runtime_internal.h:269

Definition at line 270 of file runtime_internal.h.

## halide_abort_if_false

#define halide_abort_if_false | ( |  | user_context,
|  |  | cond )

Value:
do { \
if (!(cond)) { \
halide_print(user_context, __FILE__ ":" _halide_expand_and_stringify(__LINE__) " halide_abort_if_false() failed: " #cond "\n"); \
abort(); \
} \
} while (0)
_halide_expand_and_stringify
#define _halide_expand_and_stringify(x)
Definition runtime_internal.h:270

Definition at line 271 of file runtime_internal.h.

Referenced by Halide::Runtime::Internal::aligned_offset(), Halide::Runtime::Internal::work_queue_t::assert_zeroed(), Halide::Runtime::Internal::BlockStorage::back(), Halide::Runtime::Internal::BlockStorage::back(), Halide::Runtime::Internal::BlockStorage::BlockStorage(), Halide::Runtime::Internal::BlockAllocator::create(), Halide::Runtime::Internal::RegionAllocator::create(), Halide::Runtime::Internal::StringStorage::create(), Halide::Runtime::Internal::BlockAllocator::destroy(), Halide::Runtime::Internal::BlockStorage::destroy(), Halide::Runtime::Internal::RegionAllocator::destroy(), Halide::Runtime::Internal::StringStorage::destroy(), Halide::Runtime::Internal::enqueue_work_already_locked(), Halide::Runtime::Internal::BlockStorage::front(), Halide::Runtime::Internal::BlockStorage::front(), Halide::Runtime::Internal::BlockStorage::insert(), Halide::Runtime::Internal::BlockStorage::operator[](), Halide::Runtime::Internal::BlockStorage::operator[](), Halide::Runtime::Internal::BlockStorage::pop_back(), Halide::Runtime::Internal::BlockStorage::pop_front(), Halide::Runtime::Internal::RegionAllocator::reclaim(), Halide::Runtime::Internal::RegionAllocator::release(), Halide::Runtime::Internal::BlockStorage::remove(), Halide::Runtime::Internal::BlockStorage::replace(), Halide::Runtime::Internal::BlockAllocator::reserve(), Halide::Runtime::Internal::RegionAllocator::reserve(), Halide::Runtime::Internal::RegionAllocator::retain(), and Halide::Runtime::Internal::Synchronization::fast_cond::wait().

## halide_debug_assert

#define halide_debug_assert | ( |  | user_context,
|  |  | cond )

halide_debug_assert() is like halide_assert(), but only expands into a check when DEBUG_RUNTIME is defined.

It is what you want to use in almost all cases.

Definition at line 290 of file runtime_internal.h.

Referenced by Halide::Runtime::Internal::PointerTable::assign(), Halide::Runtime::Internal::PointerTable::back(), Halide::Runtime::Internal::PrinterBase::capacity(), Halide::Runtime::Internal::MemoryArena::collect(), Halide::Runtime::Internal::THashMap< KeyType, ValueType >::copy_value_func(), Halide::Runtime::Internal::MemoryArena::create(), Halide::Runtime::Internal::MemoryArena::destroy(), Halide::Runtime::Internal::MemoryArena::destroy(), Halide::Runtime::Internal::PointerTable::destroy(), Halide::Runtime::Internal::THashMap< KeyType, ValueType >::destroy_value_func(), Halide::Runtime::Internal::PointerTable::front(), Halide::Runtime::Internal::HashMap::init(), Halide::Runtime::Internal::MemoryArena::initialize(), Halide::Runtime::Internal::PointerTable::insert(), Halide::Runtime::Internal::LinkedList::insert_after(), Halide::Runtime::Internal::LinkedList::insert_before(), Halide::Runtime::Internal::Synchronization::lock_bucket(), Halide::Runtime::Internal::Synchronization::lock_bucket_pair(), Halide::Runtime::Internal::HashMap::lookup(), Halide::Runtime::Internal::PointerTable::operator[](), Halide::Runtime::Internal::PointerTable::operator[](), Halide::Runtime::Internal::PointerTable::PointerTable(), Halide::Runtime::Internal::LinkedList::pop_back(), Halide::Runtime::Internal::PointerTable::pop_back(), Halide::Runtime::Internal::LinkedList::pop_front(), Halide::Runtime::Internal::PointerTable::pop_front(), Halide::Runtime::Internal::HashMap::prune(), Halide::Runtime::Internal::MemoryArena::reclaim(), Halide::Runtime::Internal::HashMap::release(), Halide::Internal::GPUCompilationCache< ContextT, ModuleStateT >::release_hold(), Halide::Runtime::Internal::LinkedList::remove(), Halide::Runtime::Internal::PointerTable::remove(), Halide::Runtime::Internal::PointerTable::replace(), Halide::Runtime::Internal::MemoryArena::reserve(), Halide::Runtime::Internal::PrinterBase::size(), Halide::Runtime::Internal::HashMap::store(), and Halide::Runtime::Internal::Vulkan::VulkanContext::VulkanContext().

## Typedef Documentation

## int64_t

typedef signed __INT64_TYPE__ int64_t

Definition at line 22 of file runtime_internal.h.

## uint64_t

typedef unsigned __INT64_TYPE__ uint64_t

Definition at line 23 of file runtime_internal.h.

## int32_t

typedef signed __INT32_TYPE__ int32_t

Examples
  tutorial/lesson_14_types.cpp.

Definition at line 24 of file runtime_internal.h.

## uint32_t

typedef unsigned __INT32_TYPE__ uint32_t

Examples
  tutorial/lesson_11_cross_compilation.cpp.

Definition at line 25 of file runtime_internal.h.

## int16_t

typedef signed __INT16_TYPE__ int16_t

Definition at line 26 of file runtime_internal.h.

## uint16_t

typedef unsigned __INT16_TYPE__ uint16_t

Examples
  tutorial/lesson_14_types.cpp.

Definition at line 27 of file runtime_internal.h.

## int8_t

typedef signed __INT8_TYPE__ int8_t

Definition at line 28 of file runtime_internal.h.

## uint8_t

typedef unsigned __INT8_TYPE__ uint8_t

Examples
  tutorial/lesson_09_update_definitions.cpp, tutorial/lesson_10_aot_compilation_run.cpp, and tutorial/lesson_11_cross_compilation.cpp.

Definition at line 29 of file runtime_internal.h.

## size_t

typedef __SIZE_TYPE__ size_t

Definition at line 31 of file runtime_internal.h.

## ptrdiff_t

typedef __PTRDIFF_TYPE__ ptrdiff_t

Definition at line 32 of file runtime_internal.h.

## ssize_t

typedef ptrdiff_t ssize_t

Definition at line 34 of file runtime_internal.h.

## uintptr_t

typedef __UINTPTR_TYPE__ uintptr_t

Definition at line 75 of file runtime_internal.h.

## intptr_t

typedef __INTPTR_TYPE__ intptr_t

Definition at line 76 of file runtime_internal.h.

## Function Documentation

## halide_malloc()

void * halide_malloc | ( | void * | user_context,
|  | size_t | x )

## halide_free()

void halide_free | ( | void * | user_context,
|  | void * | ptr )

## halide_current_time_ns()

WEAK int64_t halide_current_time_ns | ( | void * | user_context | ) |

References WEAK.

## halide_print()

WEAK void halide_print | ( | void * | user_context,
|  | const char * | msg )

References WEAK.

## halide_error()

WEAK void halide_error | ( | void * | user_context,
|  | const char * | msg )

References WEAK.

## getenv()

char * getenv | ( | const char * |  | ) |

Referenced by Halide::Runtime::Internal::default_desired_num_threads(), Halide::Internal::Test::get_env_variable(), and Halide::SimdOpCheckTest::main().

## free()

void free | ( | void * |  | ) |

Examples
  tutorial/lesson_09_update_definitions.cpp.

Referenced by Halide::Runtime::Buffer< T, Dims, InClassDimStorage >::allocate(), Halide::Internal::Test::get_current_directory(), Halide::Runtime::Internal::native_system_free(), and Halide::Internal::GPUCompilationCache< ContextT, ModuleStateT >::release_all().

## malloc()

void * malloc | ( | size_t |  | ) |

Examples
  tutorial/lesson_09_update_definitions.cpp.

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

## strstr()

const char * strstr | ( | const char * | ,
|  | const char * | )

Referenced by Halide::Runtime::Internal::StringUtils::count_tokens(), Halide::Runtime::Internal::StringTable::parse(), and Halide::Internal::GpuObjectLifetimeTracker::record_gpu_debug().

## atoi()

int atoi | ( | const char * |  | ) |

Referenced by Halide::Runtime::Internal::default_desired_num_threads(), Halide::Var::implicit_index(), and Halide::SimdOpCheckTest::main().

## strcmp()

int strcmp | ( | const char * | s,
|  | const char * | t )

## strncmp()

int strncmp | ( | const char * | s,
|  | const char * | t,
|  | size_t | n )

Referenced by Halide::Runtime::Internal::StringStorage::operator==(), and cmdline::parser::parse().

## strlen()

size_t strlen | ( | const char * | s | ) |

## strchr()

const char * strchr | ( | const char * | s,
|  | int | c )

Referenced by cmdline::parser::parse().

## memcpy()

void * memcpy | ( | void * | s1,
|  | const void * | s2,
|  | size_t | n )

Referenced by Halide::Runtime::Internal::LinkedList::append(), Halide::Runtime::Internal::copy_memory_helper(), Halide::Runtime::Internal::StringUtils::copy_up_to(), Halide::Runtime::Internal::Vulkan::VulkanMemoryAllocator::create_crop(), Halide::Runtime::Internal::BlockStorage::fill(), Halide::Runtime::Internal::PointerTable::fill(), Halide::float16_t::float16_t(), Halide::Runtime::Internal::LinkedList::insert_after(), Halide::Runtime::Internal::LinkedList::insert_before(), Halide::Internal::Autoscheduler::BoundContents::make_copy(), Halide::Runtime::Internal::BlockStorage::operator=(), Halide::Runtime::Internal::PointerTable::operator=(), Halide::Runtime::Internal::LinkedList::prepend(), Halide::Internal::reinterpret_bits(), Halide::Runtime::Internal::BlockStorage::replace(), Halide::Runtime::Internal::PointerTable::replace(), Halide::Parameter::scalar(), Halide::Parameter::set_scalar(), Halide::Runtime::Internal::BlockStorage::shrink_to_fit(), and Halide::Runtime::Internal::PointerTable::shrink_to_fit().

## memmove()

void * memmove | ( | void * | dest,
|  | const void * | src,
|  | size_t | n )

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

## memcmp()

int memcmp | ( | const void * | s1,
|  | const void * | s2,
|  | size_t | n )

Examples
  tutorial/lesson_11_cross_compilation.cpp.

Referenced by Halide::Runtime::Internal::keys_equal(), Halide::Runtime::Internal::BlockStorage::operator==(), and Halide::Runtime::Internal::PointerTable::operator==().

## memset()

void * memset | ( | void * | s,
|  | int | val,
|  | size_t | n )

Referenced by halide_mutex_array_create(), Halide::Runtime::Internal::HashMap::init(), Halide::Runtime::Internal::MemoryArena::reserve(), and Halide::Runtime::Internal::work_queue_t::reset().

## halide_fopen()

WEAK_INLINE void * halide_fopen | ( | const char * | filename,
|  | const char * | type )

References WEAK_INLINE.

## fileno()

int fileno | ( | void * |  | ) |

## fclose()

int fclose | ( | void * |  | ) |

Examples
  tutorial/lesson_11_cross_compilation.cpp.

## close()

int close | ( | int |  | ) |

## fwrite()

size_t fwrite | ( | const void * | ,
|  | size_t | ,
|  | size_t | ,
|  | void * | )

## write()

ssize_t write | ( | int | fd,
|  | const void * | buf,
|  | size_t | bytes )

## remove()

int remove | ( | const char * | pathname | ) |

## ioctl()

int ioctl | ( | int | fd,
|  | unsigned long | request,
|  |  | ... )

## strncpy()

char * strncpy | ( | char * | dst,
|  | const char * | src,
|  | size_t | n )

## abort()

void abort | ( |  | ) |

## halide_string_to_string()

WEAK char * halide_string_to_string | ( | char * | dst,
|  | char * | end,
|  | const char * | arg )

References WEAK.

Referenced by Halide::Runtime::Internal::PrinterBase::operator<<().

## halide_double_to_string()

WEAK char * halide_double_to_string | ( | char * | dst,
|  | char * | end,
|  | double | arg,
|  | int | scientific )

References WEAK.

Referenced by Halide::Runtime::Internal::PrinterBase::operator<<(), Halide::Runtime::Internal::PrinterBase::operator<<(), and Halide::Runtime::Internal::PrinterBase::operator<<().

## halide_int64_to_string()

WEAK char * halide_int64_to_string | ( | char * | dst,
|  | char * | end,
|  | int64_t | arg,
|  | int | digits )

References WEAK.

Referenced by Halide::Runtime::Internal::PrinterBase::operator<<(), and Halide::Runtime::Internal::PrinterBase::operator<<().

## halide_uint64_to_string()

WEAK char * halide_uint64_to_string | ( | char * | dst,
|  | char * | end,
|  | uint64_t | arg,
|  | int | digits )

References WEAK.

Referenced by Halide::Runtime::Internal::PrinterBase::operator<<(), and Halide::Runtime::Internal::PrinterBase::operator<<().

## halide_pointer_to_string()

WEAK char * halide_pointer_to_string | ( | char * | dst,
|  | char * | end,
|  | const void * | arg )

References WEAK.

Referenced by Halide::Runtime::Internal::PrinterBase::operator<<().

## halide_buffer_to_string()

WEAK char * halide_buffer_to_string | ( | char * | dst,
|  | char * | end,
|  | const halide_buffer_t * | arg )

References WEAK.

Referenced by Halide::Runtime::Internal::PrinterBase::operator<<().

## halide_type_to_string()

WEAK char * halide_type_to_string | ( | char * | dst,
|  | char * | end,
|  | const halide_type_t * | arg )

References WEAK.

Referenced by Halide::Runtime::Internal::PrinterBase::operator<<().

## halide_get_symbol()

WEAK void * halide_get_symbol | ( | const char * | name | ) |

References WEAK.

## halide_load_library()

WEAK void * halide_load_library | ( | const char * | name | ) |

References WEAK.

## halide_get_library_symbol()

WEAK void * halide_get_library_symbol | ( | void * | lib,
|  | const char * | name )

References WEAK.

## halide_start_clock()

WEAK int halide_start_clock | ( | void * | user_context | ) |

References WEAK.

## halide_sleep_us()

WEAK void halide_sleep_us | ( | void * | user_context,
|  | int | us )

References WEAK.

## halide_device_free_as_destructor()

WEAK void halide_device_free_as_destructor | ( | void * | user_context,
|  | void * | obj )

References WEAK.

## halide_device_and_host_free_as_destructor()

WEAK void halide_device_and_host_free_as_destructor | ( | void * | user_context,
|  | void * | obj )

References WEAK.

## halide_device_host_nop_free()

WEAK void halide_device_host_nop_free | ( | void * | user_context,
|  | void * | obj )

References WEAK.

## halide_profiler_stack_peak_update()

WEAK void halide_profiler_stack_peak_update | ( | void * | user_context,
|  | halide_profiler_instance_state * | instance,
|  | uint64_t * | f_values )

References WEAK.

## halide_profiler_memory_allocate()

WEAK void halide_profiler_memory_allocate | ( | void * | user_context,
|  | halide_profiler_instance_state * | instance,
|  | int | func_id,
|  | uint64_t | incr )

References WEAK.

## halide_profiler_memory_free()

WEAK void halide_profiler_memory_free | ( | void * | user_context,
|  | halide_profiler_instance_state * | instance,
|  | int | func_id,
|  | uint64_t | decr )

References WEAK.

## halide_profiler_instance_start()

WEAK int halide_profiler_instance_start | ( | void * | user_context,
|  | const char * | pipeline_name,
|  | int | num_funcs,
|  | const uint64_t * | func_names,
|  | halide_profiler_instance_state * | instance )

References WEAK.

## halide_profiler_instance_end()

WEAK int halide_profiler_instance_end | ( | void * | user_context,
|  | halide_profiler_instance_state * | instance )

References WEAK.

## halide_start_timer_chain()

WEAK void halide_start_timer_chain | ( |  | ) |

References WEAK.

## halide_disable_timer_interrupt()

WEAK void halide_disable_timer_interrupt | ( |  | ) |

References WEAK.

## halide_enable_timer_interrupt()

WEAK void halide_enable_timer_interrupt | ( |  | ) |

References WEAK.

## halide_host_cpu_count()

WEAK int halide_host_cpu_count | ( |  | ) |

References WEAK.

Referenced by Halide::Runtime::Internal::default_desired_num_threads().

## halide_device_and_host_malloc()

WEAK int halide_device_and_host_malloc | ( | void * | user_context,
|  | struct halide_buffer_t * | buf,
|  | const struct halide_device_interface_t * | device_interface )

References WEAK.

## halide_device_and_host_free()

WEAK int halide_device_and_host_free | ( | void * | user_context,
|  | struct halide_buffer_t * | buf )

References WEAK.

## halide_trace_helper()

WEAK int halide_trace_helper | ( | void * | user_context,
|  | const char * | func,
|  | void * | value,
|  | int * | coords,
|  | int | type_code,
|  | int | type_bits,
|  | int | type_lanes,
|  | int | code,
|  | int | parent_id,
|  | int | value_index,
|  | int | dimensions,
|  | const char * | trace_tag )

References WEAK.

## halide_use_jit_module()

WEAK void halide_use_jit_module | ( |  | ) |

References WEAK.

## halide_release_jit_module()

WEAK void halide_release_jit_module | ( |  | ) |

References WEAK.

## halide_internal_malloc_alignment()

WEAK_INLINE int halide_internal_malloc_alignment | ( |  | ) |

References WEAK_INLINE.

## halide_internal_aligned_alloc()

WEAK_INLINE void * halide_internal_aligned_alloc | ( | size_t | alignment,
|  | size_t | size )

References WEAK_INLINE.

## halide_internal_aligned_free()

WEAK_INLINE void halide_internal_aligned_free | ( | void * | ptr | ) |

References WEAK_INLINE.

## halide_thread_yield()

void halide_thread_yield | ( |  | ) |

Referenced by Halide::Runtime::Internal::halide_cond_with_spinning::wait().

## align_up()

template<typename T>

ALWAYS_INLINE T align_up | ( | T | p,
|  | size_t | alignment )

Definition at line 221 of file runtime_internal.h.

References ALWAYS_INLINE.

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

## is_power_of_two()

template<typename T>

ALWAYS_INLINE T is_power_of_two | ( | T | value | ) |

Definition at line 226 of file runtime_internal.h.

References ALWAYS_INLINE.

## Variable Documentation

## halide_set_custom_print

WEAK void(*)(void *, const char *) halide_set_custom_print(void(*print)(void *, const char *)) | ( | void(* | print )(void *, const char *) | ) |

Definition at line 91 of file runtime_internal.h.

## halide_set_error_handler

WEAK void(*)(void *, const char *) halide_set_error_handler(void(*handler)(void *, const char *)) | ( | void(* | handler )(void *, const char *) | ) |

Definition at line 92 of file runtime_internal.h.