Function gpa::metrics::LinkAndPrepareForGpuSpecificMdApiSourceUsage

Function Documentation

Result gpa::metrics::LinkAndPrepareForGpuSpecificMdApiSourceUsage(gpa::metrics::GpuId const &gpuId, char *const errorMessage = nullptr, int const errorSize = 0)

Links the Intel MD library for the specified GPU and prepares for its usage by establishing an internally maintained metrics device for it.

Note

Must be called once for a GPU before creating any instances of MD API based IMetricsSampler, IMetricsSource, and/or IQueryManager implementations for that GPU.

Note

Must be called once before creating any graphics API specific devices (VkDevice, MTLDevice, ID3D12Device or ID3D11Device) metrics collection is desired from, to workaround various MD library defects.

Note

The specified GpuId may indicate the default GPU should be used (all GpuId data members are zero).

Note

This function is NOT thread-safe.