aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/TypeUtils.hpp
blob: 2b70e28ff36a1656b8c88c681da4087783da763f (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.
// See LICENSE file in the project root for full license information.
//

#pragma once

#include "armnn/Types.hpp"
#include "Half.hpp"

namespace armnn
{


template<DataType DT>
struct ResolveTypeImpl;

template<>
struct ResolveTypeImpl<DataType::QuantisedAsymm8>
{
    using Type = uint8_t;
};

template <>
struct ResolveTypeImpl<DataType::Float16>
{
    using Type = Half;
};

template<>
struct ResolveTypeImpl<DataType::Float32>
{
    using Type = float;
};

template<DataType DT>
using ResolveType = typename ResolveTypeImpl<DT>::Type;


} //namespace armnn