aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/test/ProfilingMocks.hpp
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2020-02-25 12:44:44 +0000
committerSadik Armagan <sadik.armagan@arm.com>2020-02-28 16:01:46 +0000
commit4c998993bda1475595be5505690ff4e08dc2389e (patch)
tree643dc71e82c8affd842481d4aa389db7de2c5c42 /src/profiling/test/ProfilingMocks.hpp
parent3b3c381963a1bfe12e083928a3abb5a9852b199b (diff)
downloadarmnn-4c998993bda1475595be5505690ff4e08dc2389e.tar.gz
IVGCVSW-4454 Remove the CounterSet and Device fields from Category
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I721f59cd1f6d068e02dabd62c42871a43be9d934
Diffstat (limited to 'src/profiling/test/ProfilingMocks.hpp')
-rw-r--r--src/profiling/test/ProfilingMocks.hpp36
1 files changed, 4 insertions, 32 deletions
diff --git a/src/profiling/test/ProfilingMocks.hpp b/src/profiling/test/ProfilingMocks.hpp
index 3782a0f7e4..19aad491af 100644
--- a/src/profiling/test/ProfilingMocks.hpp
+++ b/src/profiling/test/ProfilingMocks.hpp
@@ -443,18 +443,10 @@ public:
~MockCounterDirectory() = default;
// Register profiling objects
- const Category* RegisterCategory(const std::string& categoryName,
- const armnn::Optional<uint16_t>& deviceUid = armnn::EmptyOptional(),
- const armnn::Optional<uint16_t>& counterSetUid = armnn::EmptyOptional())
+ const Category* RegisterCategory(const std::string& categoryName)
{
- // Get the device UID
- uint16_t deviceUidValue = deviceUid.has_value() ? deviceUid.value() : 0;
-
- // Get the counter set UID
- uint16_t counterSetUidValue = counterSetUid.has_value() ? counterSetUid.value() : 0;
-
// Create the category
- CategoryPtr category = std::make_unique<Category>(categoryName, deviceUidValue, counterSetUidValue);
+ CategoryPtr category = std::make_unique<Category>(categoryName);
BOOST_ASSERT(category);
// Get the raw category pointer
@@ -468,8 +460,7 @@ public:
}
const Device* RegisterDevice(const std::string& deviceName,
- uint16_t cores = 0,
- const armnn::Optional<std::string>& parentCategoryName = armnn::EmptyOptional())
+ uint16_t cores = 0)
{
// Get the device UID
uint16_t deviceUid = GetNextUid();
@@ -485,22 +476,12 @@ public:
// Register the device
m_Devices.insert(std::make_pair(deviceUid, std::move(device)));
- // Connect the counter set to the parent category, if required
- if (parentCategoryName.has_value())
- {
- // Set the counter set UID in the parent category
- Category* parentCategory = const_cast<Category*>(GetCategory(parentCategoryName.value()));
- BOOST_ASSERT(parentCategory);
- parentCategory->m_DeviceUid = deviceUid;
- }
-
return devicePtr;
}
const CounterSet* RegisterCounterSet(
const std::string& counterSetName,
- uint16_t count = 0,
- const armnn::Optional<std::string>& parentCategoryName = armnn::EmptyOptional())
+ uint16_t count = 0)
{
// Get the counter set UID
uint16_t counterSetUid = GetNextUid();
@@ -516,15 +497,6 @@ public:
// Register the counter set
m_CounterSets.insert(std::make_pair(counterSetUid, std::move(counterSet)));
- // Connect the counter set to the parent category, if required
- if (parentCategoryName.has_value())
- {
- // Set the counter set UID in the parent category
- Category* parentCategory = const_cast<Category*>(GetCategory(parentCategoryName.value()));
- BOOST_ASSERT(parentCategory);
- parentCategory->m_CounterSetUid = counterSetUid;
- }
-
return counterSetPtr;
}