Navigation
API > API/Runtime > API/Runtime/Core
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ParallelForWithPreWorkWithTaskContext
(
const TCHAR* DebugName, |
General purpose parallel for that uses the taskgraph | Async/ParallelFor.h | |
void ParallelForWithPreWorkWithTaskContext
(
const TCHAR* DebugName, |
General purpose parallel for that uses the taskgraph | Async/ParallelFor.h |
ParallelForWithPreWorkWithTaskContext(const TCHAR *, TArray< ContextType, ContextAllocatorType > &, int32, int32, BodyType &&, PreWorkType &&, EParallelForFlags)
Description
General purpose parallel for that uses the taskgraph
| Name | ParallelForWithPreWorkWithTaskContext |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Async/ParallelFor.h |
| Include Path | #include "Async/ParallelFor.h" |
template<typename ContextType, typename ContextAllocatorType, typename BodyType, typename PreWorkType>
void ParallelForWithPreWorkWithTaskContext
(
const TCHAR * DebugName,
TArray < ContextType, ContextAllocatorType > & OutContexts,
int32 Num,
int32 MinBatchSize,
BodyType && Body,
PreWorkType && CurrentThreadWorkToDoBeforeHelping,
EParallelForFlags Flags
)
Parameters
| Name | Remarks |
|---|---|
| DebugName; | ProfilingScope and DebugName |
| OutContexts; | Array that will hold the user-defined, task-level context objects (allocated per parallel task) |
| Num; | number of calls of Body; Body(0), Body(1), ..., Body(Num - 1) |
| MinBatchSize; | Minimum Size of a Batch (will only launch DivUp(Num, MinBatchSize) Workers |
| Body; | Function to call from multiple threads |
| CurrentThreadWorkToDoBeforeHelping; | The work is performed on the main thread before it starts helping with the ParallelFor proper |
| Flags; | Used to customize the behavior of the ParallelFor if needed. 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. |
ParallelForWithPreWorkWithTaskContext(const TCHAR *, TArray< ContextType, ContextAllocatorType > &, int32, int32, ContextConstructorType &&, BodyType &&, PreWorkType &&, EParallelForFlags)
Description
General purpose parallel for that uses the taskgraph
| Name | ParallelForWithPreWorkWithTaskContext |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Async/ParallelFor.h |
| Include Path | #include "Async/ParallelFor.h" |
template<typename ContextType, typename ContextAllocatorType, typename ContextConstructorType, typename BodyType, typename PreWorkType>
void ParallelForWithPreWorkWithTaskContext
(
const TCHAR * DebugName,
TArray < ContextType, ContextAllocatorType > & OutContexts,
int32 Num,
int32 MinBatchSize,
ContextConstructorType && ContextConstructor,
BodyType && Body,
PreWorkType && CurrentThreadWorkToDoBeforeHelping,
EParallelForFlags Flags
)
Parameters
| Name | Remarks |
|---|---|
| DebugName; | ProfilingScope and DebugName |
| OutContexts; | Array that will hold the user-defined, task-level context objects (allocated per parallel task) |
| Num; | number of calls of Body; Body(0), Body(1), ..., Body(Num - 1) |
| MinBatchSize; | Minimum Size of a Batch (will only launch DivUp(Num, MinBatchSize) Workers |
| ContextConstructor; | Function to call to initialize each task context allocated for the operation |
| Body; | Function to call from multiple threads |
| CurrentThreadWorkToDoBeforeHelping; | The work is performed on the main thread before it starts helping with the ParallelFor proper |
| Flags; | Used to customize the behavior of the ParallelFor if needed. 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. |