From 4c998993bda1475595be5505690ff4e08dc2389e Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Tue, 25 Feb 2020 12:44:44 +0000 Subject: IVGCVSW-4454 Remove the CounterSet and Device fields from Category Signed-off-by: Sadik Armagan Change-Id: I721f59cd1f6d068e02dabd62c42871a43be9d934 --- src/profiling/test/ProfilingMocks.hpp | 36 ++++------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) (limited to 'src/profiling/test/ProfilingMocks.hpp') 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& deviceUid = armnn::EmptyOptional(), - const armnn::Optional& 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(categoryName, deviceUidValue, counterSetUidValue); + CategoryPtr category = std::make_unique(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& 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(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& 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(GetCategory(parentCategoryName.value())); - BOOST_ASSERT(parentCategory); - parentCategory->m_CounterSetUid = counterSetUid; - } - return counterSetPtr; } -- cgit v1.2.1