|
Blender
V2.93
|
Class ExecutionGroup is a group of Operations that are executed as one. This grouping is used to combine Operations that can be executed as one whole when multi-processing. More...
#include <COM_ExecutionGroup.h>
Public Member Functions | |
| ExecutionGroup (int id) | |
| int | get_id () const |
| const ExecutionGroupFlags | get_flags () const |
| bool | addOperation (NodeOperation *operation) |
| add an operation to this ExecutionGroup More... | |
| void | setOutputExecutionGroup (bool is_output) |
| set whether this ExecutionGroup is an output More... | |
| void | determineResolution (unsigned int resolution[2]) |
| determine the resolution of this ExecutionGroup More... | |
| void | setResolution (unsigned int resolution[2]) |
| set the resolution of this executiongroup More... | |
| unsigned int | getWidth () const |
| get the width of this execution group More... | |
| unsigned int | getHeight () const |
| get the height of this execution group More... | |
| NodeOperation * | getOutputOperation () const |
| get the output operation of this ExecutionGroup More... | |
| MemoryBuffer * | constructConsolidatedMemoryBuffer (MemoryProxy &memoryProxy, rcti &rect) |
| compose multiple chunks into a single chunk More... | |
| void | initExecution () |
| initExecution is called just before the execution of the whole graph will be done. More... | |
| MemoryBuffer ** | getInputBuffersCPU () |
| get all inputbuffers needed to calculate an chunk More... | |
| MemoryBuffer ** | getInputBuffersOpenCL (int chunkNumber) |
| get all inputbuffers needed to calculate an chunk More... | |
| MemoryBuffer * | allocateOutputBuffer (rcti &rect) |
| allocate the outputbuffer of a chunk More... | |
| void | finalizeChunkExecution (int chunkNumber, MemoryBuffer **memoryBuffers) |
| after a chunk is executed the needed resources can be freed or unlocked. More... | |
| void | deinitExecution () |
| deinitExecution is called just after execution the whole graph. More... | |
| void | execute (ExecutionSystem *graph) |
| schedule an ExecutionGroup More... | |
| void | determineChunkRect (rcti *r_rect, const unsigned int chunkNumber) const |
| Determine the rect (minx, maxx, miny, maxy) of a chunk. More... | |
| void | setChunksize (int chunksize) |
| eCompositorPriority | getRenderPriority () |
| get the Render priority of this ExecutionGroup More... | |
| void | setViewerBorder (float xmin, float xmax, float ymin, float ymax) |
| set border for viewer operation More... | |
| void | setRenderBorder (float xmin, float xmax, float ymin, float ymax) |
Friends | |
| class | DebugInfo |
Class ExecutionGroup is a group of Operations that are executed as one. This grouping is used to combine Operations that can be executed as one whole when multi-processing.
Definition at line 84 of file COM_ExecutionGroup.h.
| blender::compositor::ExecutionGroup::ExecutionGroup | ( | int | id | ) |
Definition at line 71 of file COM_ExecutionGroup.cc.
References BLI_rcti_init(), and id.
| bool blender::compositor::ExecutionGroup::addOperation | ( | NodeOperation * | operation | ) |
add an operation to this ExecutionGroup
| system | |
| operation |
Definition at line 129 of file COM_ExecutionGroup.cc.
References blender::compositor::ExecutionGroupFlags::complex, blender::compositor::NodeOperationFlags::complex, blender::compositor::NodeOperation::get_flags(), blender::compositor::ExecutionGroupFlags::initialized, blender::compositor::NodeOperationFlags::is_read_buffer_operation, blender::compositor::NodeOperationFlags::is_write_buffer_operation, blender::compositor::ExecutionGroupFlags::open_cl, blender::compositor::NodeOperationFlags::open_cl, blender::compositor::ExecutionGroupFlags::single_threaded, and blender::compositor::NodeOperationFlags::single_threaded.
Referenced by blender::compositor::add_group_operations_recursive().
| MemoryBuffer * blender::compositor::ExecutionGroup::allocateOutputBuffer | ( | rcti & | rect | ) |
allocate the outputbuffer of a chunk
| chunkNumber | the number of the chunk in the ExecutionGroup |
| rect | the rect of that chunk |
Definition at line 494 of file COM_ExecutionGroup.cc.
References buffer, blender::compositor::NodeOperation::get_flags(), blender::compositor::WriteBufferOperation::getMemoryProxy(), getOutputOperation(), blender::compositor::NodeOperationFlags::is_write_buffer_operation, and blender::compositor::Temporary.
Referenced by blender::compositor::OpenCLDevice::execute().
| MemoryBuffer * blender::compositor::ExecutionGroup::constructConsolidatedMemoryBuffer | ( | MemoryProxy & | memoryProxy, |
| rcti & | rect | ||
| ) |
compose multiple chunks into a single chunk
Definition at line 418 of file COM_ExecutionGroup.cc.
References blender::compositor::MemoryProxy::getBuffer(), result, and blender::compositor::Temporary.
Referenced by getInputBuffersOpenCL().
| void blender::compositor::ExecutionGroup::deinitExecution | ( | ) |
deinitExecution is called just after execution the whole graph.
Definition at line 189 of file COM_ExecutionGroup.cc.
| void blender::compositor::ExecutionGroup::determineChunkRect | ( | rcti * | r_rect, |
| const unsigned int | chunkNumber | ||
| ) | const |
Determine the rect (minx, maxx, miny, maxy) of a chunk.
Definition at line 487 of file COM_ExecutionGroup.cc.
| void blender::compositor::ExecutionGroup::determineResolution | ( | unsigned int | resolution[2] | ) |
determine the resolution of this ExecutionGroup
| resolution |
Definition at line 199 of file COM_ExecutionGroup.cc.
References BLI_rcti_init(), blender::compositor::NodeOperation::getHeight(), getOutputOperation(), blender::compositor::NodeOperation::getWidth(), and setResolution().
| void blender::compositor::ExecutionGroup::execute | ( | ExecutionSystem * | graph | ) |
schedule an ExecutionGroup
first the order of the chunks will be determined. This is determined by finding the ViewerOperation and get the relevant information from it.
After determining the order of the chunks the chunks will be scheduled
| graph | this method is called for the top execution groups. containing the compositor node or the preview node or the viewer node) |
Definition at line 323 of file COM_ExecutionGroup.cc.
References BLI_system_thread_count(), blender::compositor::context, blender::compositor::Executed, blender::compositor::DebugInfo::execution_group_finished(), blender::compositor::DebugInfo::execution_group_started(), blender::compositor::WorkScheduler::finish(), graph, blender::compositor::DebugInfo::graphviz(), blender::compositor::NotScheduled, PIL_check_seconds_timer(), blender::compositor::Scheduled, bNodeTree::tbh, bNodeTree::test_break, bNodeTree::udh, and bNodeTree::update_draw.
| void blender::compositor::ExecutionGroup::finalizeChunkExecution | ( | int | chunkNumber, |
| MemoryBuffer ** | memoryBuffers | ||
| ) |
after a chunk is executed the needed resources can be freed or unlocked.
| chunknumber | |
| memorybuffers |
Definition at line 427 of file COM_ExecutionGroup.cc.
References atomic_add_and_fetch_u(), BLI_snprintf(), buffer, blender::compositor::Executed, MEM_freeN, bNodeTree::prh, bNodeTree::progress, blender::compositor::Scheduled, bNodeTree::sdh, blender::compositor::WorkPackage::state, bNodeTree::stats_draw, and TIP_.
Referenced by blender::compositor::CPUDevice::execute(), and blender::compositor::OpenCLDevice::execute().
|
inline |
Definition at line 248 of file COM_ExecutionGroup.h.
References m_flags.
Referenced by blender::compositor::opencl_schedule(), and blender::compositor::operator<<().
|
inline |
Definition at line 243 of file COM_ExecutionGroup.h.
Referenced by blender::compositor::operator<<().
|
inline |
get the height of this execution group
Definition at line 300 of file COM_ExecutionGroup.h.
References m_height.
| MemoryBuffer** blender::compositor::ExecutionGroup::getInputBuffersCPU | ( | ) |
get all inputbuffers needed to calculate an chunk
| chunkNumber | the chunk to be calculated |
| MemoryBuffer ** blender::compositor::ExecutionGroup::getInputBuffersOpenCL | ( | int | chunkNumber | ) |
get all inputbuffers needed to calculate an chunk
| chunkNumber | the chunk to be calculated |
Definition at line 401 of file COM_ExecutionGroup.cc.
References constructConsolidatedMemoryBuffer(), blender::compositor::MemoryProxy::getExecutor(), MEM_callocN, output, and blender::compositor::WorkPackage::rect.
Referenced by blender::compositor::OpenCLDevice::execute().
| NodeOperation * blender::compositor::ExecutionGroup::getOutputOperation | ( | ) | const |
get the output operation of this ExecutionGroup
Definition at line 148 of file COM_ExecutionGroup.cc.
Referenced by allocateOutputBuffer(), determineResolution(), blender::compositor::CPUDevice::execute(), blender::compositor::OpenCLDevice::execute(), getRenderPriority(), blender::compositor::operator<<(), setRenderBorder(), and setViewerBorder().
| eCompositorPriority blender::compositor::ExecutionGroup::getRenderPriority | ( | ) |
get the Render priority of this ExecutionGroup
Definition at line 95 of file COM_ExecutionGroup.cc.
References getOutputOperation(), and blender::compositor::NodeOperation::getRenderPriority().
|
inline |
get the width of this execution group
Definition at line 292 of file COM_ExecutionGroup.h.
References m_width.
| void blender::compositor::ExecutionGroup::initExecution | ( | ) |
initExecution is called just before the execution of the whole graph will be done.
Definition at line 182 of file COM_ExecutionGroup.cc.
|
inline |
Definition at line 383 of file COM_ExecutionGroup.h.
|
inline |
set whether this ExecutionGroup is an output
| isOutput |
Definition at line 268 of file COM_ExecutionGroup.h.
References blender::compositor::ExecutionGroupFlags::is_output.
Referenced by blender::compositor::NodeOperationBuilder::group_operations().
|
inline |
set the resolution of this executiongroup
| resolution |
Definition at line 283 of file COM_ExecutionGroup.h.
Referenced by determineResolution(), and blender::compositor::ReadBufferOperation::determineResolution().
| void blender::compositor::ExecutionGroup::setViewerBorder | ( | float | xmin, |
| float | xmax, | ||
| float | ymin, | ||
| float | ymax | ||
| ) |
set border for viewer operation
Definition at line 601 of file COM_ExecutionGroup.cc.
References BLI_rcti_init(), blender::compositor::NodeOperation::get_flags(), getOutputOperation(), and blender::compositor::NodeOperationFlags::use_viewer_border.
|
friend |
Definition at line 403 of file COM_ExecutionGroup.h.