Halide 22.0.0 Halide compiler and libraries

Public Member Functions | Public Attributes | List of all members
Halide::Runtime::Internal::work_queue_t Struct Reference

`#include <thread_pool_common.h>`

## Public Member Functions
ALWAYS_INLINE bool | running () const
ALWAYS_INLINE void | assert_zeroed () const
ALWAYS_INLINE void | reset ()

## Public Attributes
halide_mutex | mutex
int | desired_threads_working
int | zero_marker
work * | jobs
int | threads_created
int | a_team_size
int | target_a_team_size
halide_cond_with_spinning | wake_a_team
halide_cond_with_spinning | wake_b_team
halide_cond_with_spinning | wake_owners
int | workers_sleeping
int | owners_sleeping
halide_thread * | threads [MAX_THREADS]
bool | shutdown
bool | initialized
int | threads_reserved

## Detailed Description

Definition at line 147 of file thread_pool_common.h.

## Member Function Documentation

## ◆ running()

ALWAYS_INLINE bool Halide::Runtime::Internal::work_queue_t::running | ( |  | ) | const
| inline

Definition at line 194 of file thread_pool_common.h.

References shutdown.

## ◆ assert_zeroed()

ALWAYS_INLINE void Halide::Runtime::Internal::work_queue_t::assert_zeroed | ( |  | ) | const
| inline

Definition at line 199 of file thread_pool_common.h.

References halide_abort_if_false.

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

## ◆ reset()

ALWAYS_INLINE void Halide::Runtime::Internal::work_queue_t::reset | ( |  | ) |
| inline

Definition at line 211 of file thread_pool_common.h.

References memset().

Referenced by halide_shutdown_thread_pool().

## Member Data Documentation

## ◆ mutex

halide_mutex Halide::Runtime::Internal::work_queue_t::mutex

Definition at line 149 of file thread_pool_common.h.

Referenced by 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(), Halide::Runtime::Internal::worker_thread(), Halide::Runtime::Internal::worker_thread_already_locked(), Halide::Runtime::Internal::worker_thread_idle(), and Halide::Runtime::Internal::worker_thread_stall().

## ◆ desired_threads_working

int Halide::Runtime::Internal::work_queue_t::desired_threads_working

Definition at line 152 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), halide_get_num_threads(), and halide_set_num_threads().

## ◆ zero_marker

int Halide::Runtime::Internal::work_queue_t::zero_marker

Definition at line 156 of file thread_pool_common.h.

## ◆ jobs

work* Halide::Runtime::Internal::work_queue_t::jobs

Definition at line 159 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), and Halide::Runtime::Internal::worker_thread_already_locked().

## ◆ threads_created

int Halide::Runtime::Internal::work_queue_t::threads_created

Definition at line 162 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), halide_shutdown_thread_pool(), and Halide::Runtime::Internal::worker_thread_already_locked().

## ◆ a_team_size

int Halide::Runtime::Internal::work_queue_t::a_team_size

Definition at line 169 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), and Halide::Runtime::Internal::worker_thread_idle().

## ◆ target_a_team_size

int Halide::Runtime::Internal::work_queue_t::target_a_team_size

Definition at line 169 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), and Halide::Runtime::Internal::worker_thread_idle().

## ◆ wake_a_team

halide_cond_with_spinning Halide::Runtime::Internal::work_queue_t::wake_a_team

Definition at line 175 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), halide_default_semaphore_release(), halide_shutdown_thread_pool(), and Halide::Runtime::Internal::worker_thread_idle().

## ◆ wake_b_team

halide_cond_with_spinning Halide::Runtime::Internal::work_queue_t::wake_b_team

Definition at line 175 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), halide_shutdown_thread_pool(), and Halide::Runtime::Internal::worker_thread_idle().

## ◆ wake_owners

halide_cond_with_spinning Halide::Runtime::Internal::work_queue_t::wake_owners

Definition at line 175 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), halide_default_semaphore_release(), halide_shutdown_thread_pool(), Halide::Runtime::Internal::worker_thread_already_locked(), and Halide::Runtime::Internal::worker_thread_stall().

## ◆ workers_sleeping

int Halide::Runtime::Internal::work_queue_t::workers_sleeping

Definition at line 179 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), and Halide::Runtime::Internal::worker_thread_idle().

## ◆ owners_sleeping

int Halide::Runtime::Internal::work_queue_t::owners_sleeping

Definition at line 179 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), and Halide::Runtime::Internal::worker_thread_stall().

## ◆ threads

halide_thread* Halide::Runtime::Internal::work_queue_t::threads[MAX_THREADS]

Definition at line 182 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), and halide_shutdown_thread_pool().

## ◆ shutdown

bool Halide::Runtime::Internal::work_queue_t::shutdown

Definition at line 186 of file thread_pool_common.h.

Referenced by halide_shutdown_thread_pool(), running(), and Halide::Runtime::Internal::worker_thread_already_locked().

## ◆ initialized

bool Halide::Runtime::Internal::work_queue_t::initialized

Definition at line 186 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), and halide_shutdown_thread_pool().

## ◆ threads_reserved

int Halide::Runtime::Internal::work_queue_t::threads_reserved

Definition at line 192 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), and Halide::Runtime::Internal::worker_thread_already_locked().

The documentation for this struct was generated from the following file:

- src/runtime/thread_pool_common.h