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/_holder_8cpp_source.xhtml | 127 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 20.02/_holder_8cpp_source.xhtml (limited to '20.02/_holder_8cpp_source.xhtml') diff --git a/20.02/_holder_8cpp_source.xhtml b/20.02/_holder_8cpp_source.xhtml new file mode 100644 index 0000000000..4f7abbc8cb --- /dev/null +++ b/20.02/_holder_8cpp_source.xhtml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + +ArmNN: src/profiling/Holder.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Holder.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 <armnn/BackendId.hpp>
7 #include "Holder.hpp"
8 
9 namespace armnn
10 {
11 
12 namespace profiling
13 {
14 
16 {
17  m_CapturePeriod = other.m_CapturePeriod;
18  m_CounterIds = other.m_CounterIds;
19  m_ActiveBackends = other.m_ActiveBackends;
20 
21  return *this;
22 }
23 
24 void CaptureData::SetActiveBackends(const std::set<armnn::BackendId>& activeBackends)
25 {
26  m_ActiveBackends = activeBackends;
27 }
28 
29 void CaptureData::SetCapturePeriod(uint32_t capturePeriod)
30 {
31  m_CapturePeriod = capturePeriod;
32 }
33 
34 void CaptureData::SetCounterIds(const std::vector<uint16_t>& counterIds)
35 {
36  m_CounterIds = counterIds;
37 }
38 
39 const std::set<armnn::BackendId>& CaptureData::GetActiveBackends() const
40 {
41  return m_ActiveBackends;
42 }
43 
45 {
46  return m_CapturePeriod;
47 }
48 
49 const std::vector<uint16_t>& CaptureData::GetCounterIds() const
50 {
51  return m_CounterIds;
52 }
53 
55 {
56  std::lock_guard<std::mutex> lockGuard(m_CaptureThreadMutex);
57 
58  return m_CaptureData;
59 }
60 
61 bool CaptureData::IsCounterIdInCaptureData(uint16_t counterId)
62 {
63  for (auto m_CounterId : m_CounterIds) {
64  if (m_CounterId == counterId)
65  {
66  return true;
67  }
68  }
69 
70  // Return false by default unless counterId is found
71  return false;
72 }
73 
74 void Holder::SetCaptureData(uint32_t capturePeriod,
75  const std::vector<uint16_t>& counterIds,
76  const std::set<armnn::BackendId>& activeBackends)
77 {
78  std::lock_guard<std::mutex> lockGuard(m_CaptureThreadMutex);
79 
80  m_CaptureData.SetCapturePeriod(capturePeriod);
81  m_CaptureData.SetCounterIds(counterIds);
82  m_CaptureData.SetActiveBackends(activeBackends);
83 
84 }
85 
86 } // namespace profiling
87 
88 } // namespace armnn
void SetActiveBackends(const std::set< armnn::BackendId > &activeBackends)
Definition: Holder.cpp:24
+
const std::set< armnn::BackendId > & GetActiveBackends() const
Definition: Holder.cpp:39
+
const std::vector< uint16_t > & GetCounterIds() const
Definition: Holder.cpp:49
+ +
Copyright (c) 2020 ARM Limited.
+
void SetCapturePeriod(uint32_t capturePeriod)
Definition: Holder.cpp:29
+
uint32_t GetCapturePeriod() const
Definition: Holder.cpp:44
+
CaptureData GetCaptureData() const
Definition: Holder.cpp:54
+
void SetCaptureData(uint32_t capturePeriod, const std::vector< uint16_t > &counterIds, const std::set< armnn::BackendId > &activeBackends)
Definition: Holder.cpp:74
+ + +
bool IsCounterIdInCaptureData(uint16_t counterId)
Definition: Holder.cpp:61
+
void SetCounterIds(const std::vector< uint16_t > &counterIds)
Definition: Holder.cpp:34
+
CaptureData & operator=(const CaptureData &other)
Definition: Holder.cpp:15
+
+
+ + + + -- cgit v1.2.1