Blender V4.3
COM_WorkScheduler.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#ifdef WITH_CXX_GUARDEDALLOC
8# include "MEM_guardedalloc.h"
9#endif
10
11namespace blender::compositor {
12
13struct WorkPackage;
14
23 static void schedule(WorkPackage *package);
24
33 static void initialize(int num_cpu_threads);
34
39 static void deinitialize();
40
47 static void start();
48
54 static void stop();
55
59 static void finish();
60
61 static int get_num_cpu_threads();
62
63 static int current_thread_id();
64
65#ifdef WITH_CXX_GUARDEDALLOC
66 MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkScheduler")
67#endif
68};
69
70} // namespace blender::compositor
Read Guarded memory(de)allocation.
void initialize()
contains data about work that can be scheduled
static void start()
Start the execution this methods will start the WorkScheduler. Inside this method all threads are ini...
static void schedule(WorkPackage *package)
schedule a chunk of a group to be calculated. An execution group schedules a chunk in the WorkSchedul...
static void deinitialize()
deinitialize the WorkScheduler free all allocated resources
static void finish()
wait for all work to be completed.
static void stop()
stop the execution All created thread by the start method are destroyed.