From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/_broadcast_8cpp_source.xhtml | 118 +++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 20.02/_broadcast_8cpp_source.xhtml (limited to '20.02/_broadcast_8cpp_source.xhtml') diff --git a/20.02/_broadcast_8cpp_source.xhtml b/20.02/_broadcast_8cpp_source.xhtml new file mode 100644 index 0000000000..53d62cea83 --- /dev/null +++ b/20.02/_broadcast_8cpp_source.xhtml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + +ArmNN: src/backends/reference/workloads/Broadcast.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Broadcast.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2019 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "Broadcast.hpp"
7 
8 namespace armnn
9 {
10 
11 BroadcastLoop::BroadcastLoop(const TensorShape& inShape0, const TensorShape& inShape1, const TensorShape& outShape)
12 : m_DimData(outShape.GetNumDimensions())
13 {
14  const unsigned int numDims = GetNumDimensions();
15 
16  unsigned int sIn0 = 1;
17  unsigned int sIn1 = 1;
18  unsigned int sOut = 1;
19 
20  for (unsigned int j = numDims - 1, k = 0; k < numDims ; k++, j--)
21  {
22  m_DimData[j].m_DimSize = outShape[j];
23  m_DimData[j].m_Stride1 = (inShape0[j] > 1) ? sIn0 : 0;
24  m_DimData[j].m_Stride2 = (inShape1[j] > 1) ? sIn1 : 0;
25  m_DimData[j].m_StrideOut = sOut;
26 
27  sIn0 *= inShape0[j];
28  sIn1 *= inShape1[j];
29  sOut *= outShape[j];
30  }
31 }
32 
33 BroadcastLoop::BroadcastLoop(const TensorShape& inShape, const TensorShape& outShape)
34 : m_DimData(outShape.GetNumDimensions())
35 {
36  const unsigned int numDims = GetNumDimensions();
37 
38  unsigned int sIn = 1;
39  unsigned int sOut = 1;
40 
41  for (unsigned int j = numDims - 1, k = 0; k < numDims ; k++, j--)
42  {
43  m_DimData[j].m_DimSize = outShape[j];
44  m_DimData[j].m_Stride1 = (inShape[j] > 1) ? sIn : 0;
45  m_DimData[j].m_StrideOut = sOut;
46 
47  sIn *= inShape[j];
48  sOut *= outShape[j];
49  }
50 }
51 
52 } // namespace armnn
+
Copyright (c) 2020 ARM Limited.
+ +
BroadcastLoop(const TensorShape &inShape0, const TensorShape &inShape1, const TensorShape &outShape)
Definition: Broadcast.cpp:11
+
unsigned int GetNumDimensions()
Definition: Broadcast.hpp:20
+
+
+ + + + -- cgit v1.2.1