20.11
SampleDynamicLayerSupport.cpp
Go to the documentation of this file.
1
//
2
// Copyright © 2020 Arm Ltd. All rights reserved.
3
// SPDX-License-Identifier: MIT
4
//
5
6
#include "
SampleDynamicLayerSupport.hpp
"
7
8
#include <
InternalTypes.hpp
>
9
#include <
LayerSupportCommon.hpp
>
10
#include <
armnn/Types.hpp
>
11
12
namespace
sdb
// sample dynamic backend
13
{
14
15
bool
SampleDynamicLayerSupport::IsInputSupported
(
const
armnn::TensorInfo
& input,
16
armnn::Optional<std::string&>
reasonIfUnsupported)
const
17
{
18
return
true
;
19
}
20
21
bool
SampleDynamicLayerSupport::IsOutputSupported
(
const
armnn::TensorInfo
& output,
22
armnn::Optional<std::string&>
reasonIfUnsupported)
const
23
{
24
return
true
;
25
}
26
27
bool
SampleDynamicLayerSupport::IsAdditionSupported
(
const
armnn::TensorInfo
& input0,
28
const
armnn::TensorInfo
& input1,
29
const
armnn::TensorInfo
& output,
30
armnn::Optional<std::string&>
reasonIfUnsupported)
const
31
{
32
33
if
(input0.
GetDataType
() !=
armnn::DataType::Float32
)
34
{
35
return
false
;
36
}
37
38
if
(input0.
GetDataType
() != input1.
GetDataType
())
39
{
40
return
false
;
41
}
42
43
if
(input0.
GetDataType
() != output.
GetDataType
())
44
{
45
return
false
;
46
}
47
48
return
true
;
49
}
50
51
}
// namespace sdb
armnn::Optional
Definition:
Optional.hpp:270
armnn::TensorInfo
Definition:
Tensor.hpp:152
sdb::SampleDynamicLayerSupport::IsInputSupported
bool IsInputSupported(const armnn::TensorInfo &input, armnn::Optional< std::string &> reasonIfUnsupported) const override
Definition:
SampleDynamicLayerSupport.cpp:15
InternalTypes.hpp
SampleDynamicLayerSupport.hpp
LayerSupportCommon.hpp
sdb
Definition:
SampleDynamicAdditionWorkload.cpp:11
armnn::TensorInfo::GetDataType
DataType GetDataType() const
Definition:
Tensor.hpp:194
Types.hpp
armnn::DataType::Float32
sdb::SampleDynamicLayerSupport::IsOutputSupported
bool IsOutputSupported(const armnn::TensorInfo &output, armnn::Optional< std::string &> reasonIfUnsupported) const override
Definition:
SampleDynamicLayerSupport.cpp:21
sdb::SampleDynamicLayerSupport::IsAdditionSupported
bool IsAdditionSupported(const armnn::TensorInfo &input0, const armnn::TensorInfo &input1, const armnn::TensorInfo &output, armnn::Optional< std::string &> reasonIfUnsupported=armnn::EmptyOptional()) const override
Definition:
SampleDynamicLayerSupport.cpp:27
src
dynamic
sample
SampleDynamicLayerSupport.cpp
Generated on Wed Nov 25 2020 09:59:14 for ArmNN by
1.8.13