IVGCVSW-1946: Remove armnn/src from the include paths
[platform/upstream/armnn.git] / src / armnn / layers / SubtractionLayer.cpp
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #include "SubtractionLayer.hpp"
6
7 #include "LayerCloneBase.hpp"
8
9 #include <armnn/TypesUtils.hpp>
10 #include <backendsCommon/WorkloadData.hpp>
11 #include <backendsCommon/WorkloadFactory.hpp>
12
13 namespace armnn
14 {
15
16 SubtractionLayer::SubtractionLayer(const char* name)
17     : ArithmeticBaseLayer(2, 1, LayerType::Subtraction, name)
18 {
19 }
20
21 std::unique_ptr<IWorkload> SubtractionLayer::CreateWorkload(const Graph& graph,
22                                                             const IWorkloadFactory& factory) const
23 {
24     SubtractionQueueDescriptor descriptor;
25     return factory.CreateSubtraction(descriptor, PrepInfoAndDesc(descriptor, graph));
26 }
27
28 SubtractionLayer* SubtractionLayer::Clone(Graph& graph) const
29 {
30     return CloneBase<SubtractionLayer>(graph, GetName());
31 }
32
33 } // namespace armnn