ArmNN
 23.05
ElementwiseFunction.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 "BaseIterator.hpp"
9 #include <armnn/Tensor.hpp>
10 
11 namespace armnn
12 {
13 
14 template <typename Functor>
16 {
17  using OutType = typename Functor::result_type;
18  using InType = typename Functor::first_argument_type;
19 
20  ElementwiseBinaryFunction(const TensorShape& inShape0,
21  const TensorShape& inShape1,
22  const TensorShape& outShape,
23  Decoder<InType>& inData0,
24  Decoder<InType>& inData1,
25  Encoder<OutType>& outData);
26 };
27 
28 template <typename Functor>
30 {
31  using OutType = typename Functor::result_type;
32  using InType = typename Functor::argument_type;
33 
35  const TensorShape& outShape,
36  Decoder<InType>& inData,
37  Encoder<OutType>& outData);
38 };
39 
40 template <typename Functor>
42 {
43  using OutType = bool;
44  using InType = bool;
45 
46  LogicalBinaryFunction(const TensorShape& inShape0,
47  const TensorShape& inShape1,
48  const TensorShape& outShape,
49  Decoder<InType>& inData0,
50  Decoder<InType>& inData1,
51  Encoder<OutType>& outData);
52 };
53 
54 template <typename Functor>
56 {
57  using OutType = bool;
58  using InType = bool;
59 
60  LogicalUnaryFunction(const TensorShape& inShape,
61  const TensorShape& outShape,
62  Decoder<InType>& inData,
63  Encoder<OutType>& outData);
64 };
65 
66 } //namespace armnn
armnn::ElementwiseBinaryFunction::OutType
typename Functor::result_type OutType
Definition: ElementwiseFunction.hpp:17
armnn::LogicalBinaryFunction::OutType
bool OutType
Definition: ElementwiseFunction.hpp:43
armnn::Encoder
Definition: BaseIterator.hpp:54
armnn::LogicalUnaryFunction
Definition: ElementwiseFunction.hpp:55
armnn::LogicalUnaryFunction::InType
bool InType
Definition: ElementwiseFunction.hpp:58
BaseIterator.hpp
armnn::ElementwiseUnaryFunction
Definition: ElementwiseFunction.hpp:29
armnn::ElementwiseUnaryFunction::ElementwiseUnaryFunction
ElementwiseUnaryFunction(const TensorShape &inShape, const TensorShape &outShape, Decoder< InType > &inData, Encoder< OutType > &outData)
Definition: ElementwiseFunction.cpp:34
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::LogicalUnaryFunction::LogicalUnaryFunction
LogicalUnaryFunction(const TensorShape &inShape, const TensorShape &outShape, Decoder< InType > &inData, Encoder< OutType > &outData)
Definition: ElementwiseFunction.cpp:54
armnn::TensorShape
Definition: Tensor.hpp:20
armnn::LogicalUnaryFunction::OutType
bool OutType
Definition: ElementwiseFunction.hpp:57
armnn::Decoder
Definition: BaseIterator.hpp:37
armnn::ElementwiseBinaryFunction::InType
typename Functor::first_argument_type InType
Definition: ElementwiseFunction.hpp:18
Tensor.hpp
armnn::LogicalBinaryFunction::LogicalBinaryFunction
LogicalBinaryFunction(const TensorShape &inShape0, const TensorShape &inShape1, const TensorShape &outShape, Decoder< InType > &inData0, Decoder< InType > &inData1, Encoder< OutType > &outData)
Definition: ElementwiseFunction.cpp:43
armnn::ElementwiseUnaryFunction::InType
typename Functor::argument_type InType
Definition: ElementwiseFunction.hpp:32
armnn::LogicalBinaryFunction
Definition: ElementwiseFunction.hpp:41
armnn::ElementwiseUnaryFunction::OutType
typename Functor::result_type OutType
Definition: ElementwiseFunction.hpp:31
armnn::LogicalBinaryFunction::InType
bool InType
Definition: ElementwiseFunction.hpp:44
armnn::ElementwiseBinaryFunction
Definition: ElementwiseFunction.hpp:15
armnn::ElementwiseBinaryFunction::ElementwiseBinaryFunction
ElementwiseBinaryFunction(const TensorShape &inShape0, const TensorShape &inShape1, const TensorShape &outShape, Decoder< InType > &inData0, Decoder< InType > &inData1, Encoder< OutType > &outData)
Definition: ElementwiseFunction.cpp:23