ArmNN
 25.11
Loading...
Searching...
No Matches
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
12namespace 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;
34 return true;
35 default:
36 return false;
37 }
38}
39
40}
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...
Copyright (c) 2021 ARM Limited and Contributors.
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below.
Definition Types.hpp:494
void IgnoreUnused(Ts &&...)
Base class for all descriptors.