20.02
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
armnn
13
{
14
15
bool
SampleDynamicLayerSupport::IsInputSupported
(
const
TensorInfo
& input,
16
Optional<std::string&>
reasonIfUnsupported)
const
17
{
18
return
true
;
19
}
20
21
bool
SampleDynamicLayerSupport::IsOutputSupported
(
const
TensorInfo
& output,
22
Optional<std::string&>
reasonIfUnsupported)
const
23
{
24
return
true
;
25
}
26
27
bool
SampleDynamicLayerSupport::IsAdditionSupported
(
const
TensorInfo
& input0,
28
const
TensorInfo
& input1,
29
const
TensorInfo
& output,
30
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 armnn
armnn::Optional
Definition:
Optional.hpp:270
armnn::TensorInfo
Definition:
Tensor.hpp:53
armnn
Copyright (c) 2020 ARM Limited.
Definition:
00_introduction.dox:25
InternalTypes.hpp
SampleDynamicLayerSupport.hpp
LayerSupportCommon.hpp
armnn::SampleDynamicLayerSupport::IsAdditionSupported
bool IsAdditionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
Definition:
SampleDynamicLayerSupport.cpp:27
armnn::TensorInfo::GetDataType
DataType GetDataType() const
Definition:
Tensor.hpp:95
Types.hpp
armnn::SampleDynamicLayerSupport::IsInputSupported
bool IsInputSupported(const TensorInfo &input, Optional< std::string &> reasonIfUnsupported) const override
Definition:
SampleDynamicLayerSupport.cpp:15
armnn::SampleDynamicLayerSupport::IsOutputSupported
bool IsOutputSupported(const TensorInfo &output, Optional< std::string &> reasonIfUnsupported) const override
Definition:
SampleDynamicLayerSupport.cpp:21
armnn::DataType::Float32
src
dynamic
sample
SampleDynamicLayerSupport.cpp
Generated on Fri Mar 13 2020 16:09:13 for ArmNN by
1.8.13