ArmNN
 25.11
Loading...
Searching...
No Matches
ElementwiseFunction.cpp
Go to the documentation of this file.
1//
2// Copyright © 2017-2021, 2023-2024 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
7#include "Broadcast.hpp"
8#include "Minimum.hpp"
9#include "Maximum.hpp"
10#include "Abs.hpp"
11#include "Ceil.hpp"
12#include "Exp.hpp"
13#include "Log.hpp"
14#include "Rsqrt.hpp"
15#include "Sin.hpp"
16#include "Sqrt.hpp"
17#include "Power.hpp"
18#include "SquaredDifference.hpp"
19#include "FloorDiv.hpp"
20
21
22namespace armnn
23{
24
25template <typename Functor>
27 const TensorShape& inShape1,
28 const TensorShape& outShape,
29 Decoder<InType>& inData0,
30 Decoder<InType>& inData1,
31 Encoder<OutType>& outData)
32{
33 BroadcastLoop(inShape0, inShape1, outShape).Unroll(Functor(), 0, inData0, inData1, outData);
34}
35
36template <typename Functor>
38 const TensorShape& outShape,
39 Decoder<InType>& inData,
40 Encoder<OutType>& outData)
41{
42 BroadcastLoop(inShape, outShape).Unroll(Functor(), 0, inData, outData);
43}
44
45template <typename Functor>
47 const TensorShape& inShape1,
48 const TensorShape& outShape,
49 Decoder<InType>& inData0,
50 Decoder<InType>& inData1,
51 Encoder<OutType>& outData)
52{
53 BroadcastLoop(inShape0, inShape1, outShape).Unroll(Functor(), 0, inData0, inData1, outData);
54}
55
56template <typename Functor>
58 const TensorShape& outShape,
59 Decoder<InType>& inData,
60 Encoder<OutType>& outData)
61{
62 BroadcastLoop(inShape, outShape).Unroll(Functor(), 0, inData, outData);
63}
64
65} //namespace armnn
66
76
86
87// Comparison
94
95// Unary
104
105// Logical Unary
Copyright (c) 2021 ARM Limited and Contributors.
void Unroll(Func operationFunc, unsigned int dimension, DecoderOp &inData0, DecoderOp &inData1, EncoderOp &outData)
Definition Broadcast.hpp:26
ElementwiseBinaryFunction(const TensorShape &inShape0, const TensorShape &inShape1, const TensorShape &outShape, Decoder< InType > &inData0, Decoder< InType > &inData1, Encoder< OutType > &outData)
ElementwiseUnaryFunction(const TensorShape &inShape, const TensorShape &outShape, Decoder< InType > &inData, Encoder< OutType > &outData)
LogicalBinaryFunction(const TensorShape &inShape0, const TensorShape &inShape1, const TensorShape &outShape, Decoder< InType > &inData0, Decoder< InType > &inData1, Encoder< OutType > &outData)
LogicalUnaryFunction(const TensorShape &inShape, const TensorShape &outShape, Decoder< InType > &inData, Encoder< OutType > &outData)