UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SynthBenchmark.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
8
9struct FGPUAdpater;
11
16{
17
18public:
19
20 // @param >0, WorkScale 10 for normal precision and runtime of less than a second
21 virtual void Run(FSynthBenchmarkResults& Out, bool bGPUBenchmark = true, float WorkScale = 10.0f) const = 0;
22
23 // could be moved out of SynthBenchmark, it only requires the RHI, only returns valid data after the RHI started up
24 virtual void GetRHIDisplay(FGPUAdpater& Out) const = 0;
25 virtual void GetRHIInfo(FGPUAdpater& Out, FString& RHIName) const = 0;
26
33 static inline ISynthBenchmark& Get()
34 {
35 return FModuleManager::LoadModuleChecked< ISynthBenchmark >( "SynthBenchmark" );
36 }
37
43 static inline bool IsAvailable()
44 {
45 return FModuleManager::Get().IsModuleLoaded( "SynthBenchmark" );
46 }
47};
48
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
CORE_API bool IsModuleLoaded(const FName InModuleName) const
Definition ModuleManager.cpp:347
static CORE_API FModuleManager & Get()
Definition ModuleManager.cpp:199
Definition ModuleInterface.h:14
Definition SynthBenchmark.h:16
static bool IsAvailable()
Definition SynthBenchmark.h:43
virtual void Run(FSynthBenchmarkResults &Out, bool bGPUBenchmark=true, float WorkScale=10.0f) const =0
static ISynthBenchmark & Get()
Definition SynthBenchmark.h:33
virtual void GetRHIInfo(FGPUAdpater &Out, FString &RHIName) const =0
virtual void GetRHIDisplay(FGPUAdpater &Out) const =0
Definition GenericPlatformSurvey.h:162
Definition GenericPlatformSurvey.h:124