aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ICounterValues.hpp
blob: cef02668f6ba4143f3fbdbc718adc068b28592ba (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
//
// Copyright © 2019 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//

#pragma once

#include <cstdint>

namespace armnn
{

namespace profiling
{

class IReadCounterValues
{
public:
    virtual ~IReadCounterValues() {}

    virtual bool IsCounterRegistered(uint16_t counterUid) const = 0;
    virtual uint16_t GetCounterCount() const = 0;
    virtual uint32_t GetCounterValue(uint16_t counterUid) const = 0;
};

class IWriteCounterValues
{
public:
    virtual ~IWriteCounterValues() {}

    virtual void SetCounterValue(uint16_t counterUid, uint32_t value) = 0;
    virtual uint32_t AddCounterValue(uint16_t counterUid, uint32_t value) = 0;
    virtual uint32_t SubtractCounterValue(uint16_t counterUid, uint32_t value) = 0;
    virtual uint32_t IncrementCounterValue(uint16_t counterUid) = 0;
};

class IReadWriteCounterValues : public IReadCounterValues, public IWriteCounterValues
{
public:
    virtual ~IReadWriteCounterValues() {}
};

} // namespace profiling

} // namespace armnn