Halide
synchronization_common.h File Reference
#include "HalideRuntime.h"
#include "printer.h"
#include "scoped_spin_lock.h"

Go to the source code of this file.

Classes

class  Halide::Runtime::Internal::Synchronization::spin_control
 
struct  Halide::Runtime::Internal::Synchronization::word_lock_queue_data
 
class  Halide::Runtime::Internal::Synchronization::word_lock
 
struct  Halide::Runtime::Internal::Synchronization::queue_data
 
struct  Halide::Runtime::Internal::Synchronization::hash_bucket
 
struct  Halide::Runtime::Internal::Synchronization::hash_table
 
struct  Halide::Runtime::Internal::Synchronization::bucket_pair
 
struct  Halide::Runtime::Internal::Synchronization::validate_action
 
struct  Halide::Runtime::Internal::Synchronization::parking_control
 
struct  Halide::Runtime::Internal::Synchronization::mutex_parking_control
 
class  Halide::Runtime::Internal::Synchronization::fast_mutex
 
struct  Halide::Runtime::Internal::Synchronization::signal_parking_control
 
struct  Halide::Runtime::Internal::Synchronization::broadcast_parking_control
 
struct  Halide::Runtime::Internal::Synchronization::wait_parking_control
 
class  Halide::Runtime::Internal::Synchronization::fast_cond
 
struct  halide_mutex_array
 

Namespaces

 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.
 
 Halide::Runtime
 
 Halide::Runtime::Internal
 
 Halide::Runtime::Internal::Synchronization
 

Macros

#define TSAN_ANNOTATIONS   0
 
#define lock_bit   0x01
 
#define queue_lock_bit   0x02
 
#define parked_bit   0x02
 
#define LOAD_FACTOR   4
 
#define HASH_TABLE_BITS   10
 
#define table   (*(hash_table *)table_storage)
 

Functions

ALWAYS_INLINE void Halide::Runtime::Internal::Synchronization::check_hash (uintptr_t hash)
 
WEAK hash_bucket & Halide::Runtime::Internal::Synchronization::lock_bucket (uintptr_t addr)
 
WEAK bucket_pair Halide::Runtime::Internal::Synchronization::lock_bucket_pair (uintptr_t addr_from, uintptr_t addr_to)
 
WEAK void Halide::Runtime::Internal::Synchronization::unlock_bucket_pair (bucket_pair &buckets)
 
WEAK bool Halide::Runtime::Internal::Synchronization::parking_control_validate (void *control, validate_action &action)
 
WEAK void Halide::Runtime::Internal::Synchronization::parking_control_before_sleep (void *control)
 
WEAK uintptr_t Halide::Runtime::Internal::Synchronization::parking_control_unpark (void *control, int unparked, bool more_waiters)
 
WEAK void Halide::Runtime::Internal::Synchronization::parking_control_requeue_callback (void *control, const validate_action &action, bool one_to_wake, bool some_requeued)
 
WEAK uintptr_t Halide::Runtime::Internal::Synchronization::park (uintptr_t addr, parking_control &control)
 
WEAK uintptr_t Halide::Runtime::Internal::Synchronization::unpark_one (uintptr_t addr, parking_control &control)
 
WEAK uintptr_t Halide::Runtime::Internal::Synchronization::unpark_all (uintptr_t addr, uintptr_t unpark_info)
 
WEAK int Halide::Runtime::Internal::Synchronization::unpark_requeue (uintptr_t addr_from, uintptr_t addr_to, parking_control &control, uintptr_t unpark_info)
 
WEAK bool Halide::Runtime::Internal::Synchronization::mutex_parking_control_validate (void *control, validate_action &action)
 
WEAK uintptr_t Halide::Runtime::Internal::Synchronization::mutex_parking_control_unpark (void *control, int unparked, bool more_waiters)
 
WEAK uintptr_t Halide::Runtime::Internal::Synchronization::signal_parking_control_unpark (void *control, int unparked, bool more_waiters)
 
WEAK bool Halide::Runtime::Internal::Synchronization::broadcast_parking_control_validate (void *control, validate_action &action)
 
WEAK void Halide::Runtime::Internal::Synchronization::broadcast_parking_control_requeue_callback (void *control, const validate_action &action, bool one_to_wake, bool some_requeued)
 
WEAK bool Halide::Runtime::Internal::Synchronization::wait_parking_control_validate (void *control, validate_action &action)
 
WEAK void Halide::Runtime::Internal::Synchronization::wait_parking_control_before_sleep (void *control)
 
WEAK uintptr_t Halide::Runtime::Internal::Synchronization::wait_parking_control_unpark (void *control, int unparked, bool more_waiters)
 
WEAK void halide_mutex_lock (halide_mutex *mutex)
 A basic set of mutex and condition variable functions, which call platform specific code for mutual exclusion. More...
 
WEAK void halide_mutex_unlock (halide_mutex *mutex)
 
WEAK void halide_cond_broadcast (struct halide_cond *cond)
 
WEAK void halide_cond_signal (struct halide_cond *cond)
 
WEAK void halide_cond_wait (struct halide_cond *cond, struct halide_mutex *mutex)
 
WEAK halide_mutex_arrayhalide_mutex_array_create (int sz)
 
WEAK void halide_mutex_array_destroy (void *user_context, void *array)
 
WEAK int halide_mutex_array_lock (struct halide_mutex_array *array, int entry)
 
WEAK int halide_mutex_array_unlock (struct halide_mutex_array *array, int entry)
 

Variables

WEAK char Halide::Runtime::Internal::Synchronization::table_storage [sizeof(hash_table)]
 

Macro Definition Documentation

◆ TSAN_ANNOTATIONS

#define TSAN_ANNOTATIONS   0

Definition at line 32 of file synchronization_common.h.

◆ lock_bit

#define lock_bit   0x01

Definition at line 257 of file synchronization_common.h.

◆ queue_lock_bit

#define queue_lock_bit   0x02

Definition at line 258 of file synchronization_common.h.

◆ parked_bit

#define parked_bit   0x02

Definition at line 259 of file synchronization_common.h.

◆ LOAD_FACTOR

#define LOAD_FACTOR   4

Definition at line 480 of file synchronization_common.h.

◆ HASH_TABLE_BITS

#define HASH_TABLE_BITS   10

Definition at line 493 of file synchronization_common.h.

◆ table

#define table   (*(hash_table *)table_storage)

Definition at line 498 of file synchronization_common.h.

Function Documentation

◆ halide_mutex_lock()

◆ halide_mutex_unlock()

◆ halide_cond_broadcast()

◆ halide_cond_signal()

WEAK void halide_cond_signal ( struct halide_cond cond)

◆ halide_cond_wait()

WEAK void halide_cond_wait ( struct halide_cond cond,
struct halide_mutex mutex 
)

◆ halide_mutex_array_create()

WEAK halide_mutex_array* halide_mutex_array_create ( int  sz)

◆ halide_mutex_array_destroy()

WEAK void halide_mutex_array_destroy ( void *  user_context,
void *  array 
)

Definition at line 1209 of file synchronization_common.h.

References halide_mutex_array::array, halide_free(), and user_context.

◆ halide_mutex_array_lock()

WEAK int halide_mutex_array_lock ( struct halide_mutex_array array,
int  entry 
)

Definition at line 1215 of file synchronization_common.h.

References halide_mutex_array::array, and halide_mutex_lock().

◆ halide_mutex_array_unlock()

WEAK int halide_mutex_array_unlock ( struct halide_mutex_array array,
int  entry 
)

Definition at line 1220 of file synchronization_common.h.

References halide_mutex_array::array, and halide_mutex_unlock().