blob: 2449876544944931c3edf1b4e4dff5e8cab7eaee (
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
41
42
43
44
|
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
#include "armnn/Types.hpp"
#include "Half.hpp"
namespace armnn
{
template<typename T>
bool CompatibleTypes(DataType dataType)
{
return false;
}
template<>
inline bool CompatibleTypes<float>(DataType dataType)
{
return dataType == DataType::Float32;
}
template<>
inline bool CompatibleTypes<Half>(DataType dataType)
{
return dataType == DataType::Float16;
}
template<>
inline bool CompatibleTypes<uint8_t>(DataType dataType)
{
return dataType == DataType::Boolean || dataType == DataType::QuantisedAsymm8;
}
template<>
inline bool CompatibleTypes<int32_t>(DataType dataType)
{
return dataType == DataType::Signed32;
}
} //namespace armnn
|