Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Async > API/Runtime/Core/Async/ParallelFor
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Async/ParallelFor.h |
| Include | #include "Async/ParallelFor.h" |
void ParallelFor
(
int32 Num,
TFunctionRef < void)> Body,
bool bForceSingleThread,
bool bPumpRenderingThread
)
Remarks
General purpose parallel for that uses the taskgraph
Parameters
| Name | Description |
|---|---|
| Num; | number of calls of Body; Body(0), Body(1)....Body(Num - 1) |
| Body; | Function to call from multiple threads |
| bForceSingleThread; | Mostly used for testing, if true, run single threaded instead. Notes: Please add stats around to calls to parallel for and within your lambda as appropriate. Do not clog the task graph with long running tasks or tasks that block. |