ArmNN
 24.02
ILayerSupport.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include <armnn/Types.hpp>
8 #include <armnn/Tensor.hpp>
11 
12 namespace armnn
13 {
14 
15 /// Default implementation of the ILayerSupport interface, Backends should implement this as a switch statement
16 /// for each of their LayerTypes calling their specific backend implementation of IsXXXLayerSupported.
18  const std::vector<TensorInfo>& infos,
19  const BaseDescriptor& descriptor,
20  const Optional<LstmInputParamsInfo>& lstmParamsInfo,
21  const Optional<QuantizedLstmInputParamsInfo>& quantizedLstmParamsInfo,
22  Optional<std::string&> reasonIfUnsupported) const
23 {
24  IgnoreUnused(infos);
25  IgnoreUnused(descriptor);
26  IgnoreUnused(lstmParamsInfo);
27  IgnoreUnused(quantizedLstmParamsInfo);
28  IgnoreUnused(reasonIfUnsupported);
29  switch (type)
30  {
31  case LayerType::Map:
32  return true;
33  case LayerType::Unmap:
34  return true;
35  default:
36  return false;
37  }
38 }
39 
40 }
armnn::Optional
Definition: Optional.hpp:270
IgnoreUnused.hpp
ILayerSupport.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
PolymorphicDowncast.hpp
armnn::BaseDescriptor
Base class for all descriptors.
Definition: Descriptors.hpp:22
Tensor.hpp
armnn::IgnoreUnused
void IgnoreUnused(Ts &&...)
Definition: IgnoreUnused.hpp:14
armnn::LayerType::Map
@ Map
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
Types.hpp
armnn::LayerType
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below.
Definition: Types.hpp:491
armnn::LayerType::Unmap
@ Unmap