aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2022-03-13 22:35:46 +0000
committerJim Flynn <jim.flynn@arm.com>2022-03-14 00:34:17 +0000
commitdecd08b89565b18067d229c8c25b6f3a3333c653 (patch)
tree56176931968b83646b7e69f8e5b84ff7a65a24aa /include
parent77b284e6988b9a131d6abb3140ec6663c2ae84ae (diff)
downloadarmnn-decd08b89565b18067d229c8c25b6f3a3333c653.tar.gz
IVGCVSW-6847 replace armnn:Optional with arm::pipe::Optional in profiling code
Change-Id: I048c538d4f8c21770aec2b2751c934d9fa15a4dc Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/armnn/backends/profiling/IBackendProfiling.hpp31
-rw-r--r--include/armnn/backends/profiling/IBackendProfilingContext.hpp4
-rw-r--r--include/armnnTestUtils/MockBackend.hpp6
3 files changed, 20 insertions, 21 deletions
diff --git a/include/armnn/backends/profiling/IBackendProfiling.hpp b/include/armnn/backends/profiling/IBackendProfiling.hpp
index 564bd6142d..9affab2ade 100644
--- a/include/armnn/backends/profiling/IBackendProfiling.hpp
+++ b/include/armnn/backends/profiling/IBackendProfiling.hpp
@@ -4,11 +4,10 @@
//
#pragma once
-#include <armnn/Optional.hpp>
-
#include <armnn/profiling/ISendTimelinePacket.hpp>
#include <common/include/IProfilingGuidGenerator.hpp>
+#include <common/include/Optional.hpp>
#include <memory>
#include <vector>
@@ -56,25 +55,25 @@ public:
virtual uint16_t RegisterDevice(const std::string& deviceName,
uint16_t cores = 0,
- const armnn::Optional<std::string>& parentCategoryName
- = armnn::EmptyOptional()) = 0;
+ const arm::pipe::Optional<std::string>& parentCategoryName
+ = arm::pipe::EmptyOptional()) = 0;
virtual uint16_t RegisterCounterSet(const std::string& counterSetName,
uint16_t count = 0,
- const armnn::Optional<std::string>& parentCategoryName
- = armnn::EmptyOptional()) = 0;
+ const arm::pipe::Optional<std::string>& parentCategoryName
+ = arm::pipe::EmptyOptional()) = 0;
virtual uint16_t RegisterCounter(const uint16_t uid,
- const std::string& parentCategoryName,
- uint16_t counterClass,
- uint16_t interpolation,
- double multiplier,
- const std::string& name,
- const std::string& description,
- const armnn::Optional<std::string>& units = armnn::EmptyOptional(),
- const armnn::Optional<uint16_t>& numberOfCores = armnn::EmptyOptional(),
- const armnn::Optional<uint16_t>& deviceUid = armnn::EmptyOptional(),
- const armnn::Optional<uint16_t>& counterSetUid = armnn::EmptyOptional()) = 0;
+ const std::string& parentCategoryName,
+ uint16_t counterClass,
+ uint16_t interpolation,
+ double multiplier,
+ const std::string& name,
+ const std::string& description,
+ const arm::pipe::Optional<std::string>& units = arm::pipe::EmptyOptional(),
+ const arm::pipe::Optional<uint16_t>& numberOfCores = arm::pipe::EmptyOptional(),
+ const arm::pipe::Optional<uint16_t>& deviceUid = arm::pipe::EmptyOptional(),
+ const arm::pipe::Optional<uint16_t>& counterSetUid = arm::pipe::EmptyOptional()) = 0;
virtual ~IRegisterBackendCounters() {}
};
diff --git a/include/armnn/backends/profiling/IBackendProfilingContext.hpp b/include/armnn/backends/profiling/IBackendProfilingContext.hpp
index 0b0b0facdf..a1ed05e43d 100644
--- a/include/armnn/backends/profiling/IBackendProfilingContext.hpp
+++ b/include/armnn/backends/profiling/IBackendProfilingContext.hpp
@@ -18,8 +18,8 @@ public:
virtual ~IBackendProfilingContext()
{}
virtual uint16_t RegisterCounters(uint16_t currentMaxGlobalCounterID) = 0;
- virtual armnn::Optional<std::string> ActivateCounters(uint32_t capturePeriod, const std::vector<uint16_t>&
- counterIds) = 0;
+ virtual arm::pipe::Optional<std::string> ActivateCounters(
+ uint32_t capturePeriod, const std::vector<uint16_t>& counterIds) = 0;
virtual std::vector<Timestamp> ReportCounterValues() = 0;
virtual bool EnableProfiling(bool flag) = 0;
virtual bool EnableTimelineReporting(bool flag) = 0;
diff --git a/include/armnnTestUtils/MockBackend.hpp b/include/armnnTestUtils/MockBackend.hpp
index 425062ac28..266c049c2f 100644
--- a/include/armnnTestUtils/MockBackend.hpp
+++ b/include/armnnTestUtils/MockBackend.hpp
@@ -162,7 +162,7 @@ public:
return nextMaxGlobalCounterId;
}
- Optional<std::string> ActivateCounters(uint32_t capturePeriod, const std::vector<uint16_t>& counterIds)
+ arm::pipe::Optional<std::string> ActivateCounters(uint32_t capturePeriod, const std::vector<uint16_t>& counterIds)
{
if (capturePeriod == 0 || counterIds.size() == 0)
{
@@ -170,11 +170,11 @@ public:
}
else if (capturePeriod == 15939u)
{
- return armnn::Optional<std::string>("ActivateCounters example test error");
+ return arm::pipe::Optional<std::string>("ActivateCounters example test error");
}
m_CapturePeriod = capturePeriod;
m_ActiveCounters = counterIds;
- return armnn::Optional<std::string>();
+ return arm::pipe::Optional<std::string>();
}
std::vector<arm::pipe::Timestamp> ReportCounterValues()