Skip to main content

Module counter

Module counter 

Source
Expand description

Metal GPU counter facilities for profiling.

Corresponds to Metal/MTLCounters.hpp.

The counter API allows you to sample GPU performance counters for profiling and performance analysis.

§Counter Result Types

Metal provides three types of counter results:

Structs§

Counter
A single GPU performance counter.
CounterResultStageUtilization
Stage utilization counter result.
CounterResultStatistic
Statistics counter result.
CounterResultTimestamp
Timestamp counter result.
CounterSampleBuffer
A buffer that stores GPU counter samples.
CounterSampleBufferDescriptor
Descriptor for creating a counter sample buffer.
CounterSet
A set of related GPU performance counters.

Constants§

COUNTER_DONT_SAMPLE
Value indicating that a counter should not be sampled.
COUNTER_ERROR_VALUE
Error value returned when a counter sample fails.