aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/backends/BackendProfiling.hpp
blob: bedda5d763c9a07f004fc292e9e726284ba5874f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// Copyright © 2020 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//

#pragma once

#include "ProfilingService.hpp"
#include <armnn/backends/profiling/IBackendProfiling.hpp>

namespace arm
{

namespace pipe
{

class BackendProfiling : public IBackendProfiling
{
public:
    BackendProfiling(const ProfilingOptions& options,
                     IProfilingService& profilingService,
                     const std::string& backendId)
            : m_Options(options),
              m_ProfilingService(profilingService),
              m_BackendId(backendId) {}

    ~BackendProfiling()
    {}

    std::unique_ptr<IRegisterBackendCounters>
            GetCounterRegistrationInterface(uint16_t currentMaxGlobalCounterID) override;

    std::unique_ptr<ISendTimelinePacket> GetSendTimelinePacket() override;

    IProfilingGuidGenerator& GetProfilingGuidGenerator() override;

    void ReportCounters(const std::vector<Timestamp>&) override;

    CounterStatus GetCounterStatus(uint16_t backendCounterId) override;

    std::vector<CounterStatus> GetActiveCounters() override;

    bool IsProfilingEnabled() const override;

private:
    ProfilingOptions m_Options;
    IProfilingService& m_ProfilingService;
    std::string m_BackendId;
};

}    // namespace pipe

}    // namespace arm