ArmNN
 21.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 
7 
8 #include <InternalTypes.hpp>
9 #include <LayerSupportCommon.hpp>
10 #include <armnn/Types.hpp>
11 
12 namespace sdb // sample dynamic backend
13 {
14 
16  armnn::Optional<std::string&> reasonIfUnsupported) const
17 {
18  return true;
19 }
20 
22  armnn::Optional<std::string&> reasonIfUnsupported) const
23 {
24  return true;
25 }
26 
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
bool IsInputSupported(const armnn::TensorInfo &input, armnn::Optional< std::string &> reasonIfUnsupported) const override
DataType GetDataType() const
Definition: Tensor.hpp:194
bool IsOutputSupported(const armnn::TensorInfo &output, armnn::Optional< std::string &> reasonIfUnsupported) const override
bool IsAdditionSupported(const armnn::TensorInfo &input0, const armnn::TensorInfo &input1, const armnn::TensorInfo &output, armnn::Optional< std::string &> reasonIfUnsupported=armnn::EmptyOptional()) const override