Blender V5.0
TaskScheduler Class Reference

#include <task.h>

Static Public Member Functions

static void init (const int num_threads=0)
static void exit ()
static void free_memory ()
static int max_concurrency ()

Static Protected Attributes

static thread_mutex mutex
static int users = 0
static int active_num_threads = 0

Detailed Description

Task Scheduler

Central scheduler that holds running threads ready to execute tasks. A single queue holds the task from all pools.

Definition at line 71 of file task.h.

Member Function Documentation

◆ exit()

void TaskScheduler::exit ( )
static

Definition at line 81 of file task.cpp.

References active_num_threads, lock, mutex, and users.

Referenced by TEST(), TEST(), DenoiserPipeline::~DenoiserPipeline(), and Session::~Session().

◆ free_memory()

void TaskScheduler::free_memory ( )
static

Definition at line 91 of file task.cpp.

References assert, and users.

Referenced by exit_func().

◆ init()

void TaskScheduler::init ( const int num_threads = 0)
static

Definition at line 60 of file task.cpp.

References active_num_threads, lock, LOG_INFO, mutex, and users.

Referenced by DenoiserPipeline::DenoiserPipeline(), Session::Session(), TEST(), and TEST().

◆ max_concurrency()

int TaskScheduler::max_concurrency ( )
static

Definition at line 96 of file task.cpp.

References active_num_threads, lock, mutex, and users.

Referenced by CPUDevice::CPUDevice(), and Device::get_multi_device().

Member Data Documentation

◆ active_num_threads

int TaskScheduler::active_num_threads = 0
staticprotected

Definition at line 84 of file task.h.

Referenced by exit(), init(), and max_concurrency().

◆ mutex

thread_mutex TaskScheduler::mutex
staticprotected

Definition at line 82 of file task.h.

Referenced by exit(), init(), and max_concurrency().

◆ users

int TaskScheduler::users = 0
staticprotected

Definition at line 83 of file task.h.

Referenced by exit(), free_memory(), init(), and max_concurrency().


The documentation for this class was generated from the following files: