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/_ref_debug_workload_8cpp_source.xhtml | 129 ++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 20.02/_ref_debug_workload_8cpp_source.xhtml (limited to '20.02/_ref_debug_workload_8cpp_source.xhtml') diff --git a/20.02/_ref_debug_workload_8cpp_source.xhtml b/20.02/_ref_debug_workload_8cpp_source.xhtml new file mode 100644 index 0000000000..e1750825bf --- /dev/null +++ b/20.02/_ref_debug_workload_8cpp_source.xhtml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + +ArmNN: src/backends/reference/workloads/RefDebugWorkload.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
RefDebugWorkload.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 "RefDebugWorkload.hpp"
7 #include "Debug.hpp"
8 #include "RefWorkloadUtils.hpp"
9 
10 #include <ResolveType.hpp>
11 
12 #include <cstring>
13 
14 namespace armnn
15 {
16 
17 template<armnn::DataType DataType>
19 {
20  using T = ResolveType<DataType>;
21 
22  ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, GetName() + "_Execute");
23 
24  const TensorInfo& inputInfo = GetTensorInfo(m_Data.m_Inputs[0]);
25 
26  const T* inputData = GetInputTensorData<T>(0, m_Data);
27  T* outputData = GetOutputTensorData<T>(0, m_Data);
28 
29  if (m_Callback)
30  {
31  m_Callback(m_Data.m_Guid, m_Data.m_SlotIndex, m_Data.m_Inputs[0]);
32  }
33  else
34  {
35  Debug(inputInfo, inputData, m_Data.m_Guid, m_Data.m_LayerName, m_Data.m_SlotIndex);
36  }
37 
38  std::memcpy(outputData, inputData, inputInfo.GetNumElements()*sizeof(T));
39 }
40 
41 template<armnn::DataType DataType>
43 {
44  m_Callback = func;
45 }
46 
55 
56 } // namespace armnn
void Execute() const override
+ +
CPU Execution: Reference C++ kernels.
+ + +
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
+
typename ResolveTypeImpl< DT >::Type ResolveType
Definition: ResolveType.hpp:73
+ + +
Copyright (c) 2020 ARM Limited.
+
std::function< void(LayerGuid guid, unsigned int slotIndex, ITensorHandle *tensorHandle)> DebugCallbackFunction
Define the type of callback for the Debug layer to call.
Definition: Types.hpp:244
+
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:169
+
void Debug(const TensorInfo &inputInfo, const T *inputData, LayerGuid guid, const std::string &layerName, unsigned int slotIndex)
Definition: Debug.cpp:20
+ +
void RegisterDebugCallback(const DebugCallbackFunction &func) override
+
unsigned int GetNumElements() const
Definition: Tensor.hpp:93
+
+
+ + + + -- cgit v1.2.1