Function gpa::metrics::CreateMetricsSourceComposite
Defined in File metrics-source-composite.h
Function Documentation
-
IMetricsSourceComposite *gpa::metrics::CreateMetricsSourceComposite(IMetricsSource **ppMetricsSourceArray, uint32_t metricsSourceCount, bool takeOwnership)
Creates and initializes a composite MetricsSource object that is used to manage one or more MetricsSource objects and present them as a single object that supports the IMetricsSource derived IMetricsSourceComposite interface.
Note
A composite MetricsSource object has the type kComposite and cannot contain another composite MetricsSource object.
Note
Review the IMetricsSourceComposite interface documentation for important warnings involving usage of a composite MetricsSource.
- Parameters
ppMetricsSourceArray -- [in] Pointer to an array of MetricsSource objects' interface pointers that the composite object will contain. None of their types can be kComposite. All of the MetricsSource objects must be configured with the same graphics API and be associated with the same GPU.
metricsSourceCount -- [in] Number of interface pointers pointed to by ppMetricsSourceArray.
takeOwnership -- [in] Boolean that if true indicates that upon a successful return, the composite object will own the lifespan of the contained MetricsSource objects and upon destruction will destroy them. Otherwise, if false they will not be destroyed.
- Returns
Upon success, a pointer to the created composite MetricsSource instance will be returned. Otherwise, nullptr is returned.