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

#pragma once

#include "ICounterDirectory.hpp"

namespace armnn
{

namespace profiling
{

class ISendCounterPacket
{
public:
    using IndexValuePairsVector = std::vector<std::pair<uint16_t, uint32_t>>;

    virtual ~ISendCounterPacket() {}

    /// Create and write a StreamMetaDataPacket in the buffer
    virtual void SendStreamMetaDataPacket() = 0;

    /// Create and write a CounterDirectoryPacket from the parameters to the buffer.
    virtual void SendCounterDirectoryPacket(const ICounterDirectory& counterDirectory) = 0;

    /// Create and write a PeriodicCounterCapturePacket from the parameters to the buffer.
    virtual void SendPeriodicCounterCapturePacket(uint64_t timestamp, const IndexValuePairsVector& values) = 0;

    /// Create and write a PeriodicCounterSelectionPacket from the parameters to the buffer.
    virtual void SendPeriodicCounterSelectionPacket(uint32_t capturePeriod,
                                                    const std::vector<uint16_t>& selectedCounterIds) = 0;
};

} // namespace profiling

} // namespace armnn