diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-10-10 14:08:21 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-10-11 16:33:29 +0100 |
commit | e848538efbdf01aa0b067da942c3c214f8e62826 (patch) | |
tree | d700239f1316a098849fcfc39ec70e926f86fd62 /src/profiling/Holder.cpp | |
parent | f982deaefbe5fe5814487b27f7099829839b8666 (diff) | |
download | armnn-e848538efbdf01aa0b067da942c3c214f8e62826.tar.gz |
IVGCVSW-3964 Implement the Periodic Counter Selection command handler
* Improved the PeriodicCounterPacket class to handle errors properly
* Improved the PeriodicCounterSelectionCommandHandler to handle
invalid counter UIDs in the selection packet
* Added the Periodic Counter Selection command handler to the
ProfilingService class
* Code refactoring and added comments
* Added WaitForPacketSent method to the SendCounterPacket class
to allow waiting for the packets to be sent (useful in the
unit tests)
* Added unit tests and updated the old ones accordingly
* Fixed threading issues with a number of unit tests
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Change-Id: I271b7b0bfa801d88fe1725b934d24e30cd839ed7
Diffstat (limited to 'src/profiling/Holder.cpp')
-rw-r--r-- | src/profiling/Holder.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/profiling/Holder.cpp b/src/profiling/Holder.cpp index 5916017eb6..750be7ec74 100644 --- a/src/profiling/Holder.cpp +++ b/src/profiling/Holder.cpp @@ -11,10 +11,10 @@ namespace armnn namespace profiling { -CaptureData& CaptureData::operator= (const CaptureData& captureData) +CaptureData& CaptureData::operator=(const CaptureData& other) { - m_CapturePeriod = captureData.m_CapturePeriod; - m_CounterIds = captureData.m_CounterIds; + m_CapturePeriod = other.m_CapturePeriod; + m_CounterIds = other.m_CounterIds; return *this; } @@ -29,12 +29,12 @@ void CaptureData::SetCounterIds(const std::vector<uint16_t>& counterIds) m_CounterIds = counterIds; } -std::uint32_t CaptureData::GetCapturePeriod() const +uint32_t CaptureData::GetCapturePeriod() const { return m_CapturePeriod; } -std::vector<uint16_t> CaptureData::GetCounterIds() const +const std::vector<uint16_t>& CaptureData::GetCounterIds() const { return m_CounterIds; } @@ -42,12 +42,14 @@ std::vector<uint16_t> CaptureData::GetCounterIds() const CaptureData Holder::GetCaptureData() const { std::lock_guard<std::mutex> lockGuard(m_CaptureThreadMutex); + return m_CaptureData; } void Holder::SetCaptureData(uint32_t capturePeriod, const std::vector<uint16_t>& counterIds) { std::lock_guard<std::mutex> lockGuard(m_CaptureThreadMutex); + m_CaptureData.SetCapturePeriod(capturePeriod); m_CaptureData.SetCounterIds(counterIds); } |