From ae050524109f1ce827962665436ef7430f2ac479 Mon Sep 17 00:00:00 2001 From: David Monahan Date: Wed, 22 Mar 2023 16:48:58 +0000 Subject: IVGCVSW-7255 Update Doxygen Documentation and publish on GitHub. * Updating Doxygen documentation for 23.02 release. Signed-off-by: David Monahan Change-Id: I545574ff7664b4595d2fe6a91a3c35d2ad55df82 --- 23.02/_prelu_impl_8cpp_source.xhtml | 80 +++++++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 22 deletions(-) (limited to '23.02/_prelu_impl_8cpp_source.xhtml') diff --git a/23.02/_prelu_impl_8cpp_source.xhtml b/23.02/_prelu_impl_8cpp_source.xhtml index b2c7a202f8..47c4e86bf1 100644 --- a/23.02/_prelu_impl_8cpp_source.xhtml +++ b/23.02/_prelu_impl_8cpp_source.xhtml @@ -8,7 +8,7 @@ - + ArmNN: src/backends/reference/workloads/PreluImpl.cpp Source File @@ -19,9 +19,6 @@ - @@ -30,7 +27,8 @@ extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], }); - + + @@ -51,18 +49,21 @@ - + +/* @license-end */
@@ -76,7 +77,9 @@ $(function() {
@@ -98,27 +101,60 @@ $(document).ready(function(){initNavTree('_prelu_impl_8cpp_source.xhtml','');});
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 
13 void PreluImpl(const TensorInfo& inputInfo,
14  const TensorInfo& alphaInfo,
15  const TensorInfo& outputInfo,
16  Decoder<float>& inputData,
17  Decoder<float>& alphaData,
18  Encoder<float>& outputData)
19 {
20  const TensorShape& inputShape = inputInfo.GetShape();
21  const TensorShape& alphaShape = alphaInfo.GetShape();
22  const TensorShape& outputShape = outputInfo.GetShape();
23 
24  // PReLU activation: f(x) = alpha * x for x < 0, f(x) = x for x >= 0
25  auto prelu = [](float x, float alpha)
26  {
27  return x < 0 ? alpha * x : x;
28  };
29 
30  BroadcastLoop(inputShape, alphaShape, outputShape).Unroll(prelu, 0, inputData, alphaData, outputData);
31 }
32 
33 } // namespace armnn
-
const TensorShape & GetShape() const
Definition: Tensor.hpp:191
- - - -
Copyright (c) 2021 ARM Limited and Contributors.
- - -
void PreluImpl(const TensorInfo &inputInfo, const TensorInfo &alphaInfo, const TensorInfo &outputInfo, Decoder< float > &inputData, Decoder< float > &alphaData, Encoder< float > &outputData)
Definition: PreluImpl.cpp:13
-
void Unroll(Func operationFunc, unsigned int dimension, DecoderOp &inData0, DecoderOp &inData1, EncoderOp &outData)
Definition: Broadcast.hpp:26
- - +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 
+
13 void PreluImpl(const TensorInfo& inputInfo,
+
14  const TensorInfo& alphaInfo,
+
15  const TensorInfo& outputInfo,
+
16  Decoder<float>& inputData,
+
17  Decoder<float>& alphaData,
+
18  Encoder<float>& outputData)
+
19 {
+
20  const TensorShape& inputShape = inputInfo.GetShape();
+
21  const TensorShape& alphaShape = alphaInfo.GetShape();
+
22  const TensorShape& outputShape = outputInfo.GetShape();
+
23 
+
24  // PReLU activation: f(x) = alpha * x for x < 0, f(x) = x for x >= 0
+
25  auto prelu = [](float x, float alpha)
+
26  {
+
27  return x < 0 ? alpha * x : x;
+
28  };
+
29 
+
30  BroadcastLoop(inputShape, alphaShape, outputShape).Unroll(prelu, 0, inputData, alphaData, outputData);
+
31 }
+
32 
+
33 } // namespace armnn
+
void Unroll(Func operationFunc, unsigned int dimension, DecoderOp &inData0, DecoderOp &inData1, EncoderOp &outData)
Definition: Broadcast.hpp:26
+ +
Copyright (c) 2021 ARM Limited and Contributors.
+ + + + +
const TensorShape & GetShape() const
Definition: Tensor.hpp:191
+
void PreluImpl(const TensorInfo &inputInfo, const TensorInfo &alphaInfo, const TensorInfo &outputInfo, Decoder< float > &inputData, Decoder< float > &alphaData, Encoder< float > &outputData)
Definition: PreluImpl.cpp:13
+ + + -- cgit v1.2.1