ArmNN
 20.05
AdditionLayer.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "AdditionLayer.hpp"
7 
8 #include "LayerCloneBase.hpp"
9 
10 #include <armnn/TypesUtils.hpp>
13 
14 namespace armnn
15 {
16 
19 {
20 }
21 
22 std::unique_ptr<IWorkload> AdditionLayer::CreateWorkload(const IWorkloadFactory& factory) const
23 {
24  AdditionQueueDescriptor descriptor;
25  return factory.CreateAddition(descriptor, PrepInfoAndDesc(descriptor));
26 }
27 
29 {
30  return CloneBase<AdditionLayer>(graph, GetName());
31 }
32 
34 {
35  visitor.VisitAdditionLayer(this, GetName());
36 }
37 
38 } // namespace armnn
virtual void VisitAdditionLayer(const IConnectableLayer *layer, const char *name=nullptr)=0
Function that an addition layer should call back to when its Accept(ILayerVisitor&) function is invok...
Copyright (c) 2020 ARM Limited.
WorkloadInfo PrepInfoAndDesc(QueueDescriptor &descriptor) const
Helper function to reduce duplication in *LayerCreateWorkload.
Definition: Layer.hpp:351
This layer represents an addition operation.
AdditionLayer(const char *name)
Constructor to create an AdditionLayer.
NOTE: this is an abstract class to encapsulate the element wise operations, it does not implement: st...
void Accept(ILayerVisitor &visitor) const override
Apply a visitor to this layer.
virtual std::unique_ptr< IWorkload > CreateAddition(const AdditionQueueDescriptor &descriptor, const WorkloadInfo &info) const
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
Makes a workload for the Addition type.
const char * GetName() const override
Returns the name of the layer.
Definition: Layer.hpp:305
AdditionLayer * Clone(Graph &graph) const override
Creates a dynamically-allocated copy of this layer.