0e94e612d9ab1ea36a277a709a52cc5eaba10e04
[platform/upstream/armnn.git] / src / profiling / ProfilingUtils.hpp
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5
6 #pragma once
7
8 #include <armnn/Exceptions.hpp>
9
10 #include <string>
11 #include <stdint.h>
12
13 namespace armnn
14 {
15
16 namespace profiling
17 {
18
19 uint16_t GetNextUid();
20
21 void WriteUint64(unsigned char* buffer, unsigned int offset, uint64_t value);
22
23 void WriteUint32(unsigned char* buffer, unsigned int offset, uint32_t value);
24
25 void WriteUint16(unsigned char* buffer, unsigned int offset, uint16_t value);
26
27 uint64_t ReadUint64(const unsigned char* buffer, unsigned int offset);
28
29 uint32_t ReadUint32(const unsigned char* buffer, unsigned int offset);
30
31 uint16_t ReadUint16(const unsigned char* buffer, unsigned int offset);
32
33 std::string GetSoftwareInfo();
34
35 std::string GetSoftwareVersion();
36
37 std::string GetHardwareVersion();
38
39 std::string GetProcessName();
40
41 class BufferExhaustion : public armnn::Exception
42 {
43     using Exception::Exception;
44 };
45
46 } // namespace profiling
47
48 } // namespace armnn