Halide 22.0.0 Halide compiler and libraries

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

`#include <thread_pool_common.h>`

## Public Member Functions
ALWAYS_INLINE bool | make_runnable ()
ALWAYS_INLINE bool | running () const

## Public Attributes
halide_parallel_task_t | task
halide_task_t | task_fn
work * | next_job
work * | siblings
int | sibling_count
work * | parent_job
int | threads_reserved
void * | user_context
int | active_workers
int | exit_status
int | next_semaphore
bool | owner_is_sleeping

## Detailed Description

Definition at line 84 of file thread_pool_common.h.

## Member Function Documentation

## ◆ make_runnable()

ALWAYS_INLINE bool Halide::Runtime::Internal::work::make_runnable | ( |  | ) |
| inline

Definition at line 104 of file thread_pool_common.h.

References halide_semaphore_acquire_t::count, halide_default_semaphore_try_acquire(), next_semaphore, halide_parallel_task_t::num_semaphores, halide_semaphore_acquire_t::semaphore, halide_parallel_task_t::semaphores, and task.

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

## ◆ running()

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

Definition at line 120 of file thread_pool_common.h.

References active_workers, halide_parallel_task_t::extent, and task.

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

## Member Data Documentation

## ◆ task

halide_parallel_task_t Halide::Runtime::Internal::work::task

Definition at line 85 of file thread_pool_common.h.

Referenced by Halide::Runtime::Internal::enqueue_work_already_locked(), halide_default_do_par_for(), halide_default_do_parallel_tasks(), make_runnable(), running(), and Halide::Runtime::Internal::worker_thread_already_locked().

## ◆ task_fn

halide_task_t Halide::Runtime::Internal::work::task_fn

Definition at line 89 of file thread_pool_common.h.

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

## ◆ next_job

work* Halide::Runtime::Internal::work::next_job

Definition at line 91 of file thread_pool_common.h.

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

## ◆ siblings

work* Halide::Runtime::Internal::work::siblings

Definition at line 92 of file thread_pool_common.h.

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

## ◆ sibling_count

int Halide::Runtime::Internal::work::sibling_count

Definition at line 93 of file thread_pool_common.h.

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

## ◆ parent_job

work* Halide::Runtime::Internal::work::parent_job

Definition at line 94 of file thread_pool_common.h.

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

## ◆ threads_reserved

int Halide::Runtime::Internal::work::threads_reserved

Definition at line 95 of file thread_pool_common.h.

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

## ◆ user_context

void* Halide::Runtime::Internal::work::user_context

Definition at line 97 of file thread_pool_common.h.

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

## ◆ active_workers

int Halide::Runtime::Internal::work::active_workers

Definition at line 98 of file thread_pool_common.h.

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

## ◆ exit_status

int Halide::Runtime::Internal::work::exit_status

Definition at line 99 of file thread_pool_common.h.

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

## ◆ next_semaphore

int Halide::Runtime::Internal::work::next_semaphore

Definition at line 100 of file thread_pool_common.h.

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

## ◆ owner_is_sleeping

bool Halide::Runtime::Internal::work::owner_is_sleeping

Definition at line 102 of file thread_pool_common.h.

Referenced by halide_default_do_par_for(), halide_default_do_parallel_tasks(), Halide::Runtime::Internal::worker_thread_already_locked(), and Halide::Runtime::Internal::worker_thread_stall().

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

- src/runtime/thread_pool_common.h