ArmNN
 24.02
ILayerSupport.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include <armnn/Deprecated.hpp>
8 #include <armnn/Descriptors.hpp>
9 #include <armnn/LstmParams.hpp>
10 #include <armnn/Optional.hpp>
12 
13 #include <cctype>
14 #include <functional>
15 #include <memory>
16 #include <vector>
17 
18 namespace armnn
19 {
20 
21 class TensorInfo;
22 
24 {
25 protected:
27  virtual ~ILayerSupport() {}
28 
29 public:
30  virtual bool IsLayerSupported(const LayerType& type,
31  const std::vector<TensorInfo>& infos,
32  const BaseDescriptor& descriptor,
33  const Optional<LstmInputParamsInfo>& lstmParamsInfo = EmptyOptional(),
34  const Optional<QuantizedLstmInputParamsInfo>& quantizedLstmParamsInfo =
35  EmptyOptional(),
36  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const;
37 
38 }; // class ILayerSupport
39 
40 using ILayerSupportSharedPtr = std::shared_ptr<ILayerSupport>;
41 
42 } // namespace armnn
armnn::Optional
Definition: Optional.hpp:270
armnn::ILayerSupport::ILayerSupport
ILayerSupport()
Definition: ILayerSupport.hpp:26
Descriptors.hpp
Deprecated.hpp
Optional.hpp
LstmParams.hpp
armnn::ILayerSupport::IsLayerSupported
virtual bool IsLayerSupported(const LayerType &type, const std::vector< TensorInfo > &infos, const BaseDescriptor &descriptor, const Optional< LstmInputParamsInfo > &lstmParamsInfo=EmptyOptional(), const Optional< QuantizedLstmInputParamsInfo > &quantizedLstmParamsInfo=EmptyOptional(), Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
Default implementation of the ILayerSupport interface, Backends should implement this as a switch sta...
Definition: ILayerSupport.cpp:17
armnn::ILayerSupport::~ILayerSupport
virtual ~ILayerSupport()
Definition: ILayerSupport.hpp:27
armnn::EmptyOptional
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
Definition: Optional.hpp:32
armnn::BaseDescriptor
Base class for all descriptors.
Definition: Descriptors.hpp:22
armnn::ILayerSupport
Definition: ILayerSupport.hpp:23
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
QuantizedLstmParams.hpp
armnn::ILayerSupportSharedPtr
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
Definition: ILayerSupport.hpp:40
armnn::LayerType
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below.
Definition: Types.hpp:491