aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ICounterValues.hpp
blob: 09c26b67226f8244ee7152a2bf424ef87790b165 (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
//
// 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 GetAbsoluteCounterValue(uint16_t counterUid) const = 0;
    virtual uint32_t GetDeltaCounterValue(uint16_t counterUid) = 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