Blender  V3.3
COM_WorkPackage.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 Blender Foundation. */
3 
4 #pragma once
5 
6 #ifdef WITH_CXX_GUARDEDALLOC
7 # include "MEM_guardedalloc.h"
8 #endif
9 
10 #include "COM_Enums.h"
11 
12 #include "DNA_vec_types.h"
13 
14 #include <functional>
15 #include <ostream>
16 
17 namespace blender::compositor {
18 /* Forward Declarations. */
19 class ExecutionGroup;
20 
25 struct WorkPackage {
27 
29 
34 
38  unsigned int chunk_number;
39 
44 
48  std::function<void()> execute_fn;
49 
53  std::function<void()> executed_fn;
54 
55 #ifdef WITH_CXX_GUARDEDALLOC
56  MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkPackage")
57 #endif
58 };
59 
60 std::ostream &operator<<(std::ostream &os, const WorkPackage &work_package);
61 
62 } // namespace blender::compositor
Read Guarded memory(de)allocation.
Class ExecutionGroup is a group of Operations that are executed as one. This grouping is used to comb...
SyclQueue void void size_t num_bytes void
eWorkPackageState
the execution state of a chunk in an ExecutionGroup
Definition: COM_Enums.h:45
eWorkPackageType
Work type to execute.
Definition: COM_Enums.h:64
@ NotScheduled
chunk is not yet scheduled
std::ostream & operator<<(std::ostream &os, const eCompositorPriority &priority)
Definition: COM_Enums.cc:26
contains data about work that can be scheduled
std::function< void()> executed_fn
unsigned int chunk_number
number of the chunk to be executed
std::function< void()> execute_fn
ExecutionGroup * execution_group
execution_group with the operations-setup to be evaluated