107 class ExecutionGroup;
108 class ExecutionModel;
145 int num_work_threads_;
162 bool fastcalculation,
163 const char *view_name);
191 return active_buffers_;
197 void execute_work(
const rcti &work_rect, std::function<
void(
const rcti &split_rect)> work_func);
203 template<
typename TResult>
205 std::function<TResult(
const rcti &split_rect)> work_func,
207 std::function<
void(TResult &join,
const TResult &chunk)> reduce_func)
213 chunks[current] = work_func(split_rect);
216 reduce_func(join, chunks[i]);
226 #ifdef WITH_CXX_GUARDEDALLOC
227 MEM_CXX_CLASS_ALLOC_FUNCS(
"COM:ExecutionSystem")
pthread_cond_t ThreadCondition
pthread_mutex_t ThreadMutex
Provides wrapper around system-specific atomic primitives, and some extensions (faked-atomic operatio...
ATOMIC_INLINE int32_t atomic_fetch_and_add_int32(int32_t *p, int32_t x)
Overall context of the compositor.
the ExecutionSystem contains the whole compositor tree.
void execute()
execute this system
SharedOperationBuffers & get_active_buffers()
void set_operations(const Vector< NodeOperation * > &operations, const Vector< ExecutionGroup * > &groups)
ExecutionSystem(RenderData *rd, Scene *scene, bNodeTree *editingtree, bool rendering, bool fastcalculation, const char *view_name)
Create a new ExecutionSystem and initialize it with the editingtree.
const CompositorContext & get_context() const
get the reference to the compositor context
void execute_work(const rcti &work_rect, std::function< TResult(const rcti &split_rect)> work_func, TResult &join, std::function< void(TResult &join, const TResult &chunk)> reduce_func)
void execute_work(const rcti &work_rect, std::function< void(const rcti &split_rect)> work_func)