IVGCVSW-1946: Remove armnn/src from the include paths
[platform/upstream/armnn.git] / src / armnn / TypeUtils.hpp
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5
6 #pragma once
7
8 #include "armnn/Types.hpp"
9 #include "Half.hpp"
10
11 namespace armnn
12 {
13
14
15 template<DataType DT>
16 struct ResolveTypeImpl;
17
18 template<>
19 struct ResolveTypeImpl<DataType::QuantisedAsymm8>
20 {
21     using Type = uint8_t;
22 };
23
24 template <>
25 struct ResolveTypeImpl<DataType::Float16>
26 {
27     using Type = Half;
28 };
29
30 template<>
31 struct ResolveTypeImpl<DataType::Float32>
32 {
33     using Type = float;
34 };
35
36 template<DataType DT>
37 using ResolveType = typename ResolveTypeImpl<DT>::Type;
38
39
40 } //namespace armnn