ArmNN
 24.08
RefElementwiseWorkload.hpp
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 #pragma once
7 
8 #include <armnn/Types.hpp>
9 #include "RefBaseWorkload.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 RefBaseWorkload<ParentDescriptor>
22 {
23 public:
24  RefElementwiseWorkload(const ParentDescriptor& descriptor, const WorkloadInfo& info);
25  void Execute() const override;
26  void ExecuteAsync(ExecutionData& executionData) override;
27 
28 private:
29  using InType = typename ElementwiseBinaryFunction<Functor>::InType;
30  using OutType = typename ElementwiseBinaryFunction<Functor>::OutType;
32 
33  void Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const;
34 };
35 
36 template <typename DataType = float>
37 using RefAdditionWorkload =
41 
42 template <typename DataType = float>
47 
48 template <typename DataType = float>
53 
54 template <typename DataType = float>
55 using RefDivisionWorkload =
59 
60 template <typename DataType = float>
61 using RefMaximumWorkload =
65 
66 template <typename DataType = float>
67 using RefMinimumWorkload =
71 
72 } // armnn
armnn::StringMapping::RefMaximumWorkload_Execute
@ RefMaximumWorkload_Execute
Definition: StringMapping.hpp:22
armnn::DivisionQueueDescriptor
Definition: WorkloadData.hpp:270
armnn::MaximumQueueDescriptor
Definition: WorkloadData.hpp:282
armnn::RefElementwiseWorkload::ExecuteAsync
void ExecuteAsync(ExecutionData &executionData) override
Definition: RefElementwiseWorkload.cpp:35
Minimum.hpp
WorkloadData.hpp
armnn::MultiplicationQueueDescriptor
Definition: WorkloadData.hpp:264
BaseIterator.hpp
armnn::StringMapping::RefDivisionWorkload_Execute
@ RefDivisionWorkload_Execute
Definition: StringMapping.hpp:21
armnn::RefElementwiseWorkload::Execute
void Execute() const override
Definition: RefElementwiseWorkload.cpp:29
armnn::StringMapping::RefAdditionWorkload_Execute
@ RefAdditionWorkload_Execute
Definition: StringMapping.hpp:20
armnn::StringMapping::RefMultiplicationWorkload_Execute
@ RefMultiplicationWorkload_Execute
Definition: StringMapping.hpp:24
armnn::ElementwiseBinaryFunction::OutType
typename Functor::result_type OutType
Definition: ElementwiseFunction.hpp:17
armnn::ElementwiseBinaryFunction::InType
typename Functor::first_argument_type InType
Definition: ElementwiseFunction.hpp:18
armnn::StringMapping::RefSubtractionWorkload_Execute
@ RefSubtractionWorkload_Execute
Definition: StringMapping.hpp:25
armnn::RefElementwiseWorkload::RefElementwiseWorkload
RefElementwiseWorkload(const ParentDescriptor &descriptor, const WorkloadInfo &info)
Definition: RefElementwiseWorkload.cpp:21
armnn::StringMapping::RefMinimumWorkload_Execute
@ RefMinimumWorkload_Execute
Definition: StringMapping.hpp:23
armnn::WorkloadInfo
Contains information about TensorInfos of a layer.
Definition: WorkloadInfo.hpp:16
armnn::AdditionQueueDescriptor
Definition: WorkloadData.hpp:258
armnn::BoostLogSeverityMapping::info
@ info
armnn::SubtractionQueueDescriptor
Definition: WorkloadData.hpp:276
ElementwiseFunction.hpp
Maximum.hpp
StringMapping.hpp
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
Types.hpp
RefBaseWorkload.hpp
armnn::MinimumQueueDescriptor
Definition: WorkloadData.hpp:473
armnn::RefElementwiseWorkload
Definition: RefElementwiseWorkload.hpp:21
armnn::RefBaseWorkload
Definition: RefBaseWorkload.hpp:13
armnn::experimental::ExecutionData
Definition: ExecutionData.hpp:14