![]() |
ezEngine
Release 25.03
|
Settings for ezTaskSystem::ParallelFor invocations. More...
#include <TaskSystemDeclarations.h>
Public Member Functions | |
void | DetermineThreading (ezUInt64 uiNumItemsToExecute, ezUInt32 &out_uiNumTasksToRun, ezUInt64 &out_uiNumItemsPerTask) const |
Public Attributes | |
ezUInt32 | m_uiBinSize = 1 |
ezUInt32 | m_uiMaxTasksPerThread = 2 |
ezTaskNesting | m_NestingMode = ezTaskNesting::Never |
ezAllocator * | m_pTaskAllocator = nullptr |
The allocator used to for the tasks that the parallel-for uses internally. If null, will use the default allocator. | |
Settings for ezTaskSystem::ParallelFor invocations.
ezUInt32 ezParallelForParams::m_uiBinSize = 1 |
The minimum number of items that must be processed by a task instance. If the overall number of tasks lies below this value, all work will be executed purely serially without involving any tasks at all.
ezUInt32 ezParallelForParams::m_uiMaxTasksPerThread = 2 |
Indicates how many tasks per thread may be spawned at most by a ParallelFor invocation. Higher numbers give the scheduler more leeway to balance work across available threads. Generally, if all task items are expected to take basically the same amount of time, low numbers (usually 1) are recommended, while higher numbers (initially test with 2 or 3) might yield better results for workloads where task items may take vastly different amounts of time, such that scheduling in a balanced fashion becomes more difficult.