Blender  V3.3
List of all members
blender::compositor::WorkScheduler Struct Reference

the workscheduler More...

#include <COM_WorkScheduler.h>

Static Public Member Functions

Public API
static void schedule (WorkPackage *package)
 schedule a chunk of a group to be calculated. An execution group schedules a chunk in the WorkScheduler when ExecutionGroup.get_flags().open_cl is set the work will be handled by a OpenCLDevice otherwise the work is scheduled for an CPUDevice More...
 
static void initialize (bool use_opencl, int num_cpu_threads)
 initialize the WorkScheduler More...
 
static void deinitialize ()
 deinitialize the WorkScheduler free all allocated resources More...
 
static void start (const CompositorContext &context)
 Start the execution this methods will start the WorkScheduler. Inside this method all threads are initialized. for every device a thread is created. More...
 
static void stop ()
 stop the execution All created thread by the start method are destroyed. More...
 
static void finish ()
 wait for all work to be completed. More...
 
static bool has_gpu_devices ()
 Are there OpenCL capable GPU devices initialized? the result of this method is stored in the CompositorContext A node can generate a different operation tree when OpenCLDevices exists. More...
 
static int get_num_cpu_threads ()
 
static int current_thread_id ()
 

Detailed Description

the workscheduler

Definition at line 19 of file COM_WorkScheduler.h.

Member Function Documentation

◆ current_thread_id()

int blender::compositor::WorkScheduler::current_thread_id ( )
static

◆ deinitialize()

void blender::compositor::WorkScheduler::deinitialize ( )
static

◆ finish()

void blender::compositor::WorkScheduler::finish ( )
static

◆ get_num_cpu_threads()

int blender::compositor::WorkScheduler::get_num_cpu_threads ( )
static

◆ has_gpu_devices()

bool blender::compositor::WorkScheduler::has_gpu_devices ( )
static

Are there OpenCL capable GPU devices initialized? the result of this method is stored in the CompositorContext A node can generate a different operation tree when OpenCLDevices exists.

See also
CompositorContext.get_has_active_opencl_devices

Definition at line 507 of file COM_WorkScheduler.cc.

References blender::compositor::COM_is_opencl_enabled(), and blender::compositor::opencl_has_gpu_devices().

Referenced by blender::compositor::ExecutionSystem::ExecutionSystem().

◆ initialize()

void blender::compositor::WorkScheduler::initialize ( bool  use_opencl,
int  num_cpu_threads 
)
static

initialize the WorkScheduler

during initialization the mutexes are initialized. there are two mutexes (for every device type one) After mutex initialization the system is queried in order to count the number of CPUDevices and GPUDevices to be created. For every hardware thread a CPUDevice and for every OpenCL GPU device a OpenCLDevice is created. these devices are stored in a separate list (cpudevices & gpudevices)

This function can be called multiple times to lazily initialize OpenCL.

Definition at line 515 of file COM_WorkScheduler.cc.

References blender::compositor::COM_is_opencl_enabled(), blender::compositor::COM_threading_model(), blender::compositor::g_work_scheduler, blender::compositor::num_cpu_threads, blender::compositor::opencl_initialize(), blender::compositor::Queue, blender::compositor::SingleThreaded, blender::compositor::Task, and blender::compositor::threading_model_queue_initialize().

Referenced by COM_execute().

◆ schedule()

void blender::compositor::WorkScheduler::schedule ( WorkPackage package)
static

◆ start()

void blender::compositor::WorkScheduler::start ( const CompositorContext context)
static

◆ stop()

void blender::compositor::WorkScheduler::stop ( )
static

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