Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 1 | // |
2 | // Copyright © 2017 Arm Ltd. All rights reserved. | ||||
3 | // SPDX-License-Identifier: MIT | ||||
4 | // | ||||
5 | |||||
Jan Eilers | 8eb2560 | 2020-03-09 12:13:48 +0000 | [diff] [blame] | 6 | #pragma once |
7 | |||||
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 8 | #include "Packet.hpp" |
9 | |||||
Jan Eilers | 8eb2560 | 2020-03-09 12:13:48 +0000 | [diff] [blame] | 10 | #include <armnn/utility/IgnoreUnused.hpp> |
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 11 | |
Jan Eilers | 8eb2560 | 2020-03-09 12:13:48 +0000 | [diff] [blame] | 12 | #include <cstdint> |
Derek Lamberti | 1dd75b3 | 2019-12-10 21:23:23 +0000 | [diff] [blame] | 13 | |
Aron Virginas-Tar | e898db9 | 2019-08-22 12:56:34 +0100 | [diff] [blame] | 14 | namespace armnn |
15 | { | ||||
16 | |||||
17 | namespace profiling | ||||
18 | { | ||||
19 | |||||
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 20 | class CommandHandlerFunctor |
21 | { | ||||
22 | public: | ||||
Jim Flynn | 397043f | 2019-10-17 17:37:10 +0100 | [diff] [blame] | 23 | CommandHandlerFunctor(uint32_t familyId, uint32_t packetId, uint32_t version) |
24 | : m_FamilyId(familyId), | ||||
25 | m_PacketId(packetId) | ||||
Matteo Martincigh | c2728f9 | 2019-10-07 12:35:21 +0100 | [diff] [blame] | 26 | , m_Version(version) |
27 | {} | ||||
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 28 | |
Jim Flynn | 397043f | 2019-10-17 17:37:10 +0100 | [diff] [blame] | 29 | uint32_t GetFamilyId() const; |
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 30 | uint32_t GetPacketId() const; |
31 | uint32_t GetVersion() const; | ||||
32 | |||||
Derek Lamberti | 1dd75b3 | 2019-12-10 21:23:23 +0000 | [diff] [blame] | 33 | virtual void operator()(const Packet& packet) = 0; |
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 34 | |
Jim Flynn | c4728ad | 2019-10-07 15:15:12 +0100 | [diff] [blame] | 35 | virtual ~CommandHandlerFunctor() {} |
36 | |||||
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 37 | private: |
Jim Flynn | 397043f | 2019-10-17 17:37:10 +0100 | [diff] [blame] | 38 | uint32_t m_FamilyId; |
Francis Murtagh | 11f99b4 | 2019-08-16 11:28:52 +0100 | [diff] [blame] | 39 | uint32_t m_PacketId; |
40 | uint32_t m_Version; | ||||
Aron Virginas-Tar | e898db9 | 2019-08-22 12:56:34 +0100 | [diff] [blame] | 41 | }; |
42 | |||||
43 | } // namespace profiling | ||||
44 | |||||
45 | } // namespace armnn |