ArmNN
 25.11
Loading...
Searching...
No Matches
CompatibleTypes.cpp
Go to the documentation of this file.
1//
2// Copyright © 2019-2021, 2024 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
11using namespace armnn;
12
13namespace armnnUtils
14{
15
16template<typename T>
18{
19 return false;
20}
21
22template<>
24{
25 return dataType == DataType::Float32;
26}
27
28template<>
30{
31 return dataType == DataType::Float16;
32}
33
34template<>
36{
37 return dataType == DataType::BFloat16;
38}
39
40template<>
42{
43 return dataType == DataType::Boolean || dataType == DataType::QAsymmU8;
44}
45
46template<>
48{
49 return dataType == DataType::QSymmS8
50 || dataType == DataType::QAsymmS8;
51}
52
53template<>
55{
56 return dataType == DataType::QSymmS16;
57}
58
59template<>
61{
62 return dataType == DataType::Signed32;
63}
64
65template<>
67{
68 return dataType == DataType::Signed64;
69}
70
71} //namespace armnnUtils
Copyright (c) 2021 ARM Limited and Contributors.
DataType
Definition Types.hpp:49
bool CompatibleTypes< int8_t >(DataType dataType)
bool CompatibleTypes< int32_t >(DataType dataType)
bool CompatibleTypes< int64_t >(DataType dataType)
bool CompatibleTypes< BFloat16 >(DataType dataType)
bool CompatibleTypes< int16_t >(DataType dataType)
bool CompatibleTypes< uint8_t >(DataType dataType)
bool CompatibleTypes< Half >(DataType dataType)
bool CompatibleTypes< float >(DataType dataType)
bool CompatibleTypes(armnn::DataType)