ArmNN
 21.02
RefElementwiseWorkload.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <armnn/Types.hpp>
11 #include "BaseIterator.hpp"
12 #include "ElementwiseFunction.hpp"
13 #include "Maximum.hpp"
14 #include "Minimum.hpp"
15 #include "StringMapping.hpp"
16 
17 namespace armnn
18 {
19 
20 template <typename Functor, typename ParentDescriptor, typename armnn::StringMapping::Id DebugString>
21 class RefElementwiseWorkload : public BaseWorkload<ParentDescriptor>
22 {
23 public:
27 
28  RefElementwiseWorkload(const ParentDescriptor& descriptor, const WorkloadInfo& info);
29  void PostAllocationConfigure() override;
30  void Execute() const override;
31 
32 private:
33  std::unique_ptr<Decoder<InType>> m_Input0;
34  std::unique_ptr<Decoder<InType>> m_Input1;
35  std::unique_ptr<Encoder<OutType>> m_Output;
36 };
37 
38 template <typename DataType = float>
39 using RefAdditionWorkload =
43 
44 template <typename DataType = float>
49 
50 template <typename DataType = float>
55 
56 template <typename DataType = float>
57 using RefDivisionWorkload =
61 
62 template <typename DataType = float>
63 using RefMaximumWorkload =
67 
68 template <typename DataType = float>
69 using RefMinimumWorkload =
73 
74 } // armnn
typename Functor::first_argument_type InType
typename ElementwiseBinaryFunction< Functor >::InType InType
Copyright (c) 2021 ARM Limited and Contributors.
RefElementwiseWorkload(const ParentDescriptor &descriptor, const WorkloadInfo &info)
typename Functor::result_type OutType
typename ElementwiseBinaryFunction< Functor >::OutType OutType
Contains information about inputs and outputs to a layer.