![]() |
Plasma Engine
2.0
|
Settings for plTaskSystem::ParallelFor invocations. More...
#include <TaskSystemDeclarations.h>
Public Member Functions | |
void | DetermineThreading (plUInt64 uiNumItemsToExecute, plUInt32 &out_uiNumTasksToRun, plUInt64 &out_uiNumItemsPerTask) const |
Public Attributes | |
plUInt32 | m_uiBinSize = 1 |
plUInt32 | m_uiMaxTasksPerThread = 2 |
plTaskNesting | m_NestingMode = plTaskNesting::Never |
plAllocator * | 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 plTaskSystem::ParallelFor invocations.
plUInt32 plParallelForParams::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.
plUInt32 plParallelForParams::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.