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
"
10
#include <
armnn/backends/WorkloadData.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
;
31
using
RefBaseWorkload<ParentDescriptor>::m_Data
;
32
33
void
Execute
(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs)
const
;
34
};
35
36
template
<
typename
DataType =
float
>
37
using
RefAdditionWorkload
=
38
RefElementwiseWorkload<std::plus<DataType>
,
39
AdditionQueueDescriptor
,
40
StringMapping::RefAdditionWorkload_Execute
>;
41
42
template
<
typename
DataType =
float
>
43
using
RefSubtractionWorkload
=
44
RefElementwiseWorkload<std::minus<DataType>
,
45
SubtractionQueueDescriptor
,
46
StringMapping::RefSubtractionWorkload_Execute
>;
47
48
template
<
typename
DataType =
float
>
49
using
RefMultiplicationWorkload
=
50
RefElementwiseWorkload<std::multiplies<DataType>
,
51
MultiplicationQueueDescriptor
,
52
StringMapping::RefMultiplicationWorkload_Execute
>;
53
54
template
<
typename
DataType =
float
>
55
using
RefDivisionWorkload
=
56
RefElementwiseWorkload<std::divides<DataType>
,
57
DivisionQueueDescriptor
,
58
StringMapping::RefDivisionWorkload_Execute
>;
59
60
template
<
typename
DataType =
float
>
61
using
RefMaximumWorkload
=
62
RefElementwiseWorkload<armnn::maximum<DataType>
,
63
MaximumQueueDescriptor
,
64
StringMapping::RefMaximumWorkload_Execute
>;
65
66
template
<
typename
DataType =
float
>
67
using
RefMinimumWorkload
=
68
RefElementwiseWorkload<armnn::minimum<DataType>
,
69
MinimumQueueDescriptor
,
70
StringMapping::RefMinimumWorkload_Execute
>;
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
src
backends
reference
workloads
RefElementwiseWorkload.hpp
Generated on Wed Aug 28 2024 14:31:51 for Arm NN by
1.8.17