Program Listing for File metrics-source-composite.h

Return to documentation for file (include\metrics\metrics-source-composite.h)

/*
    © Intel Corporation.

    This software and the related documents are Intel copyrighted materials,
    and your use of them is governed by the express license under which they
    were provided to you ("License"). Unless the License provides otherwise,
    you may not use, modify, copy, publish, distribute, disclose or transmit
    this software or the related documents without Intel's prior written
    permission.

    This software and the related documents are provided as is, with no express
    or implied warranties, other than those that are expressly stated in the
    License.
*/

#pragma once

#include "metrics/metrics-source.h"

namespace gpa {
namespace metrics {

class GPA_METRICS_CLASS_EXPORT IMetricsSourceComposite : virtual public IMetricsSource
{
public:
    virtual ~IMetricsSourceComposite();

    virtual uint32_t NumMetricsSources() const = 0;

    virtual IMetricsSource const* MetricsSource(uint32_t const metricsSourceIndex) const = 0;

    virtual Result MetricsSourceContainingGroup(
        uint32_t const compositeMetricGroupIndex,
        uint32_t* pMetricsSourceIndex,
        uint32_t* pLocalMetricGroupIndex = nullptr) const = 0;

    virtual Result MetricsSourceContainingMetric(
        uint32_t const compositeMetricIndex,
        uint32_t* pMetricsSourceIndex,
        uint32_t* pGlobalMetricIndex = nullptr) const = 0;

    virtual int32_t MetricsSourceStartGroupIndex(uint32_t const metricsSourceIndex) const = 0;

    virtual int32_t MetricsSourceStartMetricIndex(uint32_t const metricsSourceIndex) const = 0;
};

GPA_METRICS_EXPORT
IMetricsSourceComposite* CreateMetricsSourceComposite(
    IMetricsSource** ppMetricsSourceArray,
    uint32_t metricsSourceCount,
    bool takeOwnership);

GPA_METRICS_EXPORT
void DestroyMetricsSourceComposite(IMetricsSourceComposite* pMetricsSourceComposite);

}  // namespace metrics
}  // namespace gpa