ArmNN
 20.02
ElementwiseFunction.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 #include "Broadcast.hpp"
8 #include <functional>
9 #include "Minimum.hpp"
10 #include "Maximum.hpp"
11 #include "Abs.hpp"
12 #include "Exp.hpp"
13 #include "Rsqrt.hpp"
14 #include "Sqrt.hpp"
15 
16 
17 namespace armnn
18 {
19 
20 template <typename Functor>
22  const TensorShape& inShape1,
23  const TensorShape& outShape,
24  Decoder<InType>& inData0,
25  Decoder<InType>& inData1,
26  Encoder<OutType>& outData)
27 {
28  BroadcastLoop(inShape0, inShape1, outShape).Unroll(Functor(), 0, inData0, inData1, outData);
29 }
30 
31 template <typename Functor>
33  const TensorShape& outShape,
34  Decoder<InType>& inData,
35  Encoder<OutType>& outData)
36 {
37  BroadcastLoop(inShape, outShape).Unroll(Functor(), 0, inData, outData);
38 }
39 
40 } //namespace armnn
41 
48 
49 // Comparison
56 
57 // Unary
Copyright (c) 2020 ARM Limited.
ElementwiseUnaryFunction(const TensorShape &inShape, const TensorShape &outShape, Decoder< InType > &inData, Encoder< OutType > &outData)
ElementwiseBinaryFunction(const TensorShape &inShape0, const TensorShape &inShape1, const TensorShape &outShape, Decoder< InType > &inData0, Decoder< InType > &inData1, Encoder< OutType > &outData)
void Unroll(Func operationFunc, unsigned int dimension, DecoderOp &inData0, DecoderOp &inData1, EncoderOp &outData)
Definition: Broadcast.hpp:26