ArmNN
 22.05.01
CompatibleTypes.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #include <armnn/Types.hpp>
7 
8 #include "BFloat16.hpp"
9 #include "Half.hpp"
10 
11 using namespace armnn;
12 
13 namespace armnnUtils
14 {
15 
16 template<typename T>
18 {
19  return false;
20 }
21 
22 template<>
24 {
25  return dataType == DataType::Float32;
26 }
27 
28 template<>
30 {
31  return dataType == DataType::Float16;
32 }
33 
34 template<>
36 {
37  return dataType == DataType::BFloat16;
38 }
39 
40 template<>
42 {
43  return dataType == DataType::Boolean || dataType == DataType::QAsymmU8;
44 }
45 
46 template<>
48 {
49  return dataType == DataType::QSymmS8
50  || dataType == DataType::QAsymmS8;
51 }
52 
53 template<>
55 {
56  return dataType == DataType::QSymmS16;
57 }
58 
59 template<>
61 {
62  return dataType == DataType::Signed32;
63 }
64 
65 } //namespace armnnUtils
bool CompatibleTypes< BFloat16 >(DataType dataType)
bool CompatibleTypes< uint8_t >(DataType dataType)
bool CompatibleTypes(armnn::DataType)
Copyright (c) 2021 ARM Limited and Contributors.
bool CompatibleTypes< int8_t >(DataType dataType)
bool CompatibleTypes< int16_t >(DataType dataType)
DataType
Definition: Types.hpp:48
bool CompatibleTypes< int32_t >(DataType dataType)
bool CompatibleTypes< Half >(DataType dataType)
bool CompatibleTypes< float >(DataType dataType)