UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TGPUWorkGroupLoadBalancer< ParentInfoType > Class Template Reference

#include <GPUWorkGroupLoadBalancer.h>

+ Inheritance diagram for TGPUWorkGroupLoadBalancer< ParentInfoType >:

Public Types

using FParentInfo = ParentInfoType
 

Public Member Functions

void ReserveStorage (int32 NumBatches, int32 NumItems, int32 NumParents)
 
void Add (FParentInfo &&ParentInfo, uint32 NumChildren)
 
void GetParametersAsync (FRDGBuilder &GraphBuilder, FShaderParameters &OutShaderParameters)
 
void FinalizeParametersAsync (FShaderParameters &OutShaderParameters)
 
void FinalizeBatches ()
 
- Public Member Functions inherited from FGPUWorkGroupLoadBalancer
FWorkGroupInfo PackWorkGroupInfo (uint32 FirstItem, uint32 NumItems, uint32 Payload, uint32 CarryOverStartOffset, uint64 WorkGroupWorkBoundary)
 
FPackedItem PackItem (bool bHasCarryOver, uint32 NumChildren, uint32 Payload, uint32 BatchPrefixSum)
 
void ReserveStorage (int32 NumBatches, int32 NumItems, int32 NumWork)
 
template<typename PayloadGeneratorType >
void Add (PayloadGeneratorType &PayloadGenerator, uint32 NumChildren)
 
bool IsEmpty () const
 
template<typename PayloadGeneratorType >
void FinalizeBatches (PayloadGeneratorType &PayloadGenerator)
 
void GetParametersAsync (FRDGBuilder &GraphBuilder, FShaderParameters &OutShaderParameters)
 
void FinalizeParametersAsync (FShaderParameters &OutShaderParameters)
 
FIntVector GetWrappedCsGroupCount () const
 
uint32 GetTotalChildren () const
 

Additional Inherited Members

- Static Public Member Functions inherited from FGPUWorkGroupLoadBalancer
static void SetShaderDefines (FShaderCompilerEnvironment &OutEnvironment)
 
- Static Public Attributes inherited from FGPUWorkGroupLoadBalancer
static constexpr uint32 ThreadGroupSizeLog2 = 6U
 
static constexpr uint32 ThreadGroupSize = 1u << ThreadGroupSizeLog2
 
static constexpr uint32 PrefixBits = ThreadGroupSizeLog2
 
static constexpr uint32 PrefixBitMask = (1U << PrefixBits) - 1U
 
static constexpr uint32 NumItemBits = PrefixBits
 
static constexpr uint32 NumItemMask = (1U << NumItemBits) - 1U
 
static constexpr uint32 PayLoadBits = 32u - (1 + NumItemBits + PrefixBits)
 
- Protected Attributes inherited from FGPUWorkGroupLoadBalancer
TArray< FWorkGroupInfo, SceneRenderingAllocatorWorkGroupInfos
 
TArray< FPackedItem, SceneRenderingAllocatorItems
 
uint32 CurrentWorkGroupPrefixSum = 0u
 
uint32 CurrentWorkGroupNumItems = 0U
 
uint32 CurrentWorkGroupFirstItem = 0U
 
uint32 TotalChildren = 0U
 
uint32 CurrentWorkGroupCarryOver = 0u
 
uint64 CurrentWorkGroupWorkBoundary = 0ull
 

Member Typedef Documentation

◆ FParentInfo

Member Function Documentation

◆ Add()

void TGPUWorkGroupLoadBalancer< ParentInfoType >::Add ( FParentInfo &&  ParentInfo,
uint32  NumChildren 
)
inline

Add a span of instances to be processed.

◆ FinalizeBatches()

void TGPUWorkGroupLoadBalancer< ParentInfoType >::FinalizeBatches ( )
inline

Call when finished adding work items to the balancer to flush any in-progress batches.

◆ FinalizeParametersAsync()

void TGPUWorkGroupLoadBalancer< ParentInfoType >::FinalizeParametersAsync ( FShaderParameters OutShaderParameters)
inline

◆ GetParametersAsync()

void TGPUWorkGroupLoadBalancer< ParentInfoType >::GetParametersAsync ( FRDGBuilder GraphBuilder,
FShaderParameters OutShaderParameters 
)
inline

◆ ReserveStorage()

void TGPUWorkGroupLoadBalancer< ParentInfoType >::ReserveStorage ( int32  NumBatches,
int32  NumItems,
int32  NumParents 
)
inline

The documentation for this class was generated from the following file: