Enum Class GpuTimerPolicy
- All Implemented Interfaces:
Serializable,Comparable<GpuTimerPolicy>,Constable
Policy controlling experimental OpenGL GPU measurement backend selection.
API stability: Experimental.
- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEnables the complete capability-driven fallback chain for controlled benchmarks.Uses timestamp pairs only, avoiding ownership of the global elapsed-query target.Explicitly requests the exclusive elapsed-query backend for controlled diagnostics. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanselectBackend(GpuTimerArchitecture architecture, int timestampCounterBits, int elapsedCounterBits) Selects the first timer-query candidate from runtime counter capabilities.static GpuTimerPolicyReturns the enum constant of this class with the specified name.static GpuTimerPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SAFE
Uses timestamp pairs only, avoiding ownership of the global elapsed-query target. -
ARCHITECTURE_AWARE
Enables the complete capability-driven fallback chain for controlled benchmarks.Selection is capability-driven: timestamp pairs are preferred, elapsed queries are the timer fallback, and the runtime measurement layer may use fence completion when both timer paths are unavailable or fail qualification.
GpuTimerArchitectureremains metadata and is not treated as proof that a backend is reliable. -
TIME_ELAPSED_EXCLUSIVE
Explicitly requests the exclusive elapsed-query backend for controlled diagnostics.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
selectBackend
public GpuTimerBackend selectBackend(GpuTimerArchitecture architecture, int timestampCounterBits, int elapsedCounterBits) Selects the first timer-query candidate from runtime counter capabilities.This method selects a candidate only. Runtime qualification is responsible for deciding whether the candidate is trustworthy on the active driver/context.
- Parameters:
architecture- normalized host architecture recorded as benchmark metadatatimestampCounterBits- counter bits reported forGL_TIMESTAMPelapsedCounterBits- counter bits reported forGL_TIME_ELAPSED- Returns:
- selected timer candidate, or
GpuTimerBackend.NONE
-
allowsElapsedFallback
public boolean allowsElapsedFallback()- Returns:
- whether a failed timestamp candidate may fall back to an elapsed query
-
allowsFenceFallback
public boolean allowsFenceFallback()- Returns:
- whether failed/unavailable timer queries may fall back to fence completion
-