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/_mem_copy_workload_8cpp_source.xhtml | 126 +++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 20.02/_mem_copy_workload_8cpp_source.xhtml (limited to '20.02/_mem_copy_workload_8cpp_source.xhtml') diff --git a/20.02/_mem_copy_workload_8cpp_source.xhtml b/20.02/_mem_copy_workload_8cpp_source.xhtml new file mode 100644 index 0000000000..c481a0f720 --- /dev/null +++ b/20.02/_mem_copy_workload_8cpp_source.xhtml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + +ArmNN: src/backends/backendsCommon/MemCopyWorkload.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
MemCopyWorkload.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 <ResolveType.hpp>
7 
10 
11 #include <boost/cast.hpp>
12 
13 #include <cstring>
14 
15 namespace armnn
16 {
17 
18 namespace
19 {
20 
21 template <typename SrcTensorHandleType, typename DstTensorHandleType>
22 void GatherTensorHandlePairs(const MemCopyQueueDescriptor& descriptor,
23  std::vector<std::pair<SrcTensorHandleType*, DstTensorHandleType*>>& tensorHandlePairs)
24 {
25  const unsigned int numInputs = static_cast<unsigned int>(descriptor.m_Inputs.size());
26  tensorHandlePairs.reserve(numInputs);
27 
28  for (unsigned int i = 0; i < numInputs; ++i)
29  {
30  SrcTensorHandleType* const srcTensorHandle = boost::polymorphic_downcast<SrcTensorHandleType*>(
31  descriptor.m_Inputs[i]);
32  DstTensorHandleType* const dstTensorHandle = boost::polymorphic_downcast<DstTensorHandleType*>(
33  descriptor.m_Outputs[i]);
34 
35  tensorHandlePairs.emplace_back(srcTensorHandle, dstTensorHandle);
36  }
37 }
38 
39 } //namespace
40 
41 
43  const WorkloadInfo& info)
44  : BaseWorkload<MemCopyQueueDescriptor>(descriptor, info)
45 {
46  GatherTensorHandlePairs(descriptor, m_TensorHandlePairs);
47 }
48 
50 {
51  ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "CopyMemGeneric_Execute");
52 
53  auto copyFunc = [](void* dst, const void* src, size_t size)
54  {
55  memcpy(dst, src, size);
56  };
57 
58  for (const auto& pair : m_TensorHandlePairs)
59  {
60  CopyTensorContentsGeneric(pair.first, pair.second, copyFunc);
61  }
62 }
63 
64 } //namespace armnn
+
CopyMemGenericWorkload(const MemCopyQueueDescriptor &descriptor, const WorkloadInfo &info)
+ +
Copyright (c) 2020 ARM Limited.
+
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:169
+ + + + +
void Execute() const override
+
Contains information about inputs and outputs to a layer.
+
void CopyTensorContentsGeneric(const ITensorHandle *srcTensor, ITensorHandle *dstTensor, CopyFunc copy)
+
void GatherTensorHandlePairs(const DescriptorType &descriptor, std::vector< std::pair< SrcTensorHandleType *, DstTensorHandleType *>> &tensorHandlePairs)
+
+
+ + + + -- cgit v1.2.1