From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/_prelu_impl_8cpp_source.xhtml | 129 ++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 21.02/_prelu_impl_8cpp_source.xhtml (limited to '21.02/_prelu_impl_8cpp_source.xhtml') diff --git a/21.02/_prelu_impl_8cpp_source.xhtml b/21.02/_prelu_impl_8cpp_source.xhtml new file mode 100644 index 0000000000..202727fa52 --- /dev/null +++ b/21.02/_prelu_impl_8cpp_source.xhtml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + +ArmNN: src/backends/reference/workloads/PreluImpl.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
PreluImpl.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "PreluImpl.hpp"
7 #include "RefWorkloadUtils.hpp"
8 #include "Broadcast.hpp"
9 
10 namespace armnn
11 {
12 
14  Decoder<float>& inputData,
15  Decoder<float>& alphaData,
16  Encoder<float>& outputData)
17 {
18  const TensorInfo& inputInfo = GetTensorInfo(data.m_Inputs[0]);
19  const TensorInfo& alphaInfo = GetTensorInfo(data.m_Inputs[1]);
20  const TensorInfo& outputInfo = GetTensorInfo(data.m_Outputs[0]);
21 
22  const TensorShape& inputShape = inputInfo.GetShape();
23  const TensorShape& alphaShape = alphaInfo.GetShape();
24  const TensorShape& outputShape = outputInfo.GetShape();
25 
26  // PReLU activation: f(x) = alpha * x for x < 0, f(x) = x for x >= 0
27  auto prelu = [](float x, float alpha)
28  {
29  return x < 0 ? alpha * x : x;
30  };
31 
32  BroadcastLoop(inputShape, alphaShape, outputShape).Unroll(prelu, 0, inputData, alphaData, outputData);
33 }
34 
35 } // namespace armnn
+
const TensorShape & GetShape() const
Definition: Tensor.hpp:187
+ + + +
Copyright (c) 2021 ARM Limited and Contributors.
+ +
void PreluImpl(const PreluQueueDescriptor &data, Decoder< float > &inputData, Decoder< float > &alphaData, Encoder< float > &outputData)
Definition: PreluImpl.cpp:13
+ + +
std::vector< ITensorHandle * > m_Outputs
+
void Unroll(Func operationFunc, unsigned int dimension, DecoderOp &inData0, DecoderOp &inData1, EncoderOp &outData)
Definition: Broadcast.hpp:26
+ +
std::vector< ITensorHandle * > m_Inputs
+
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
+ +
+
+ + + + -- cgit v1.2.1