ArmNN
 25.11
Loading...
Searching...
No Matches
MinimumLayer.cpp
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
6#include "MinimumLayer.hpp"
7
8#include "LayerCloneBase.hpp"
9
10#include <armnn/TypesUtils.hpp>
13
14namespace armnn
15{
16
19{
20}
21
22std::unique_ptr<IWorkload> MinimumLayer::CreateWorkload(const IWorkloadFactory& factory) const
23{
24 MinimumQueueDescriptor descriptor;
25 SetAdditionalInfo(descriptor);
26
27 return factory.CreateWorkload(LayerType::Minimum, descriptor, PrepInfoAndDesc(descriptor));
28}
29
31{
32 return CloneBase<MinimumLayer>(graph, GetName());
33}
34
36{
37 strategy.ExecuteStrategy(this, GetParameters(), {}, GetName());
38}
39
40} // namespace armnn
ElementwiseBaseLayer(unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, const char *name)
virtual void ExecuteStrategy(const IConnectableLayer *layer, const armnn::BaseDescriptor &descriptor, const std::vector< armnn::ConstTensor > &constants, const char *name, const armnn::LayerBindingId id=0)=0
virtual std::unique_ptr< IWorkload > CreateWorkload(LayerType type, const QueueDescriptor &descriptor, const WorkloadInfo &info) const =0
Backends should implement their own CreateWorkload function with a switch statement.
WorkloadInfo PrepInfoAndDesc(QueueDescriptor &descriptor) const
Helper function to reduce duplication in *LayerCreateWorkload.
Definition Layer.hpp:409
LayerType * CloneBase(Graph &graph, Params &&... params) const
const char * GetName() const override
Returns the name of the layer.
Definition Layer.hpp:332
virtual const BaseDescriptor & GetParameters() const override
If the layer has a descriptor return it.
Definition Layer.hpp:378
void SetAdditionalInfo(QueueDescriptor &descriptor) const
Definition Layer.cpp:303
MinimumLayer * Clone(Graph &graph) const override
Creates a dynamically-allocated copy of this layer.
void ExecuteStrategy(IStrategy &strategy) const override
Apply a visitor to this layer.
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
Makes a workload for the Minimum type.
MinimumLayer(const char *name)
Constructor to create a MinimumLayer.
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