Navigation
API > API/Runtime > API/Runtime/DataflowCore
This structure stores a compiled graph A compiled graph allow a dataflow evaluator to evaluate a graph efficiently without having to parse the graph again Reference to nodes are sorted by tasks in order of execution and dependency Making it easy to spawn actual async task from for example The data is also organized in arrays of fixed sized structure for faster cache access and limited allocation
Note that a compiled graph is associated to a specific main or sub graph
Todo(dataflow) : A compiled graph do not yet provide any information about branching and conditional, this will be added in the near future
| Name | FCompiledGraph |
| Type | struct |
| Header File | /Engine/Source/Runtime/Dataflow/Core/Public/Dataflow/DataflowCompiledGraph.h |
| Include Path | #include "Dataflow/DataflowCompiledGraph.h" |
Syntax
struct FCompiledGraph
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCompiledGraph
(
TSharedRef< const FGraph > InSourceGraph |
Dataflow/DataflowCompiledGraph.h |
Structs
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Commands | TArray< FCommand > | List of commands (with reference to the task and node arrays) | Dataflow/DataflowCompiledGraph.h | |
| NodeIdToIndex | TMap< FGuid, int32 > | O(1) lookup table mapping a node's FGuid to its index in Nodes. | Dataflow/DataflowCompiledGraph.h | |
| Nodes | TArray< FNode > | List of nodes (with back reference to the task array) | Dataflow/DataflowCompiledGraph.h | |
| SourceGraph | TSharedRef< const FGraph > | Dataflow/DataflowCompiledGraph.h | ||
| Tasks | TArray< FTask > | List of tasks (index into the command buffer array) | Dataflow/DataflowCompiledGraph.h | |
| TerminalNodeIndices | TArray< int32 > | Pre-baked list of terminal node indices, populated at compile time from Node->IsTerminal(). | Dataflow/DataflowCompiledGraph.h | |
| UpstreamEdgesFlat | TArray< int32 > | CSR storage of upstream-node-index edges for every node. | Dataflow/DataflowCompiledGraph.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddDependency
(
int32 TaskId |
Dataflow/DataflowCompiledGraph.h | ||
| Add a node to the current task. | Dataflow/DataflowCompiledGraph.h | ||
void EndTask() |
Dataflow/DataflowCompiledGraph.h | ||
int32 FindNodeIndex
(
const FGuid& NodeId |
O(1) lookup of a node's index in the compiled graph by its FGuid. | Dataflow/DataflowCompiledGraph.h | |
FGuid GetNextNodeId
(
int32 NodeIndex |
Dataflow/DataflowCompiledGraph.h | ||
| O(1) lookup of a node's id by its index in the compiled graph. | Dataflow/DataflowCompiledGraph.h | ||
int32 GetNumNodes() |
Dataflow/DataflowCompiledGraph.h | ||
int32 GetNumTasks() |
Dataflow/DataflowCompiledGraph.h | ||
TSharedRef< const FGraph > GetSourceGraph() |
Dataflow/DataflowCompiledGraph.h | ||
| Dataflow/DataflowCompiledGraph.h | |||
TConstArrayView< int32 > GetTerminalNodeIndices() |
Indices of all terminal nodes (nodes with IsTerminal() == true) in the compiled graph. | Dataflow/DataflowCompiledGraph.h | |
TConstArrayView< int32 > GetUpstreamNodeIndices
(
int32 NodeIndex |
Indices (into Nodes) of nodes whose outputs feed the given node. Empty for source nodes. | Dataflow/DataflowCompiledGraph.h | |
int32 StartTask() |
Dataflow/DataflowCompiledGraph.h |