#include <ProfilingMocks.hpp>
|
| MockCounterDirectory ()=default |
|
| ~MockCounterDirectory ()=default |
|
const Category * | RegisterCategory (const std::string &categoryName) |
|
const Device * | RegisterDevice (const std::string &deviceName, uint16_t cores=0) |
|
const CounterSet * | RegisterCounterSet (const std::string &counterSetName, uint16_t count=0) |
|
const Counter * | RegisterCounter (const std::string &backendId, 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 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()) |
|
uint16_t | GetCategoryCount () const override |
|
uint16_t | GetDeviceCount () const override |
|
uint16_t | GetCounterSetCount () const override |
|
uint16_t | GetCounterCount () const override |
|
const Categories & | GetCategories () const override |
|
const Devices & | GetDevices () const override |
|
const CounterSets & | GetCounterSets () const override |
|
const Counters & | GetCounters () const override |
|
const Category * | GetCategory (const std::string &name) const override |
|
const Device * | GetDevice (uint16_t uid) const override |
|
const CounterSet * | GetCounterSet (uint16_t uid) const override |
|
const Counter * | GetCounter (uint16_t uid) const override |
|
Definition at line 447 of file ProfilingMocks.hpp.
◆ MockCounterDirectory()
◆ ~MockCounterDirectory()
◆ GetCategories()
const Categories& GetCategories |
( |
| ) |
const |
|
inlineoverride |
◆ GetCategory()
const Category* GetCategory |
( |
const std::string & |
name | ) |
const |
|
inlineoverride |
Definition at line 589 of file ProfilingMocks.hpp.
591 auto it = std::find_if(m_Categories.begin(), m_Categories.end(), [&name](
const CategoryPtr& category)
593 ARM_PIPE_ASSERT(category);
595 return category->m_Name == name;
598 if (it == m_Categories.end())
◆ GetCategoryCount()
uint16_t GetCategoryCount |
( |
| ) |
const |
|
inlineoverride |
◆ GetCounter()
const Counter* GetCounter |
( |
uint16_t |
uid | ) |
const |
|
inlineoverride |
◆ GetCounterCount()
uint16_t GetCounterCount |
( |
| ) |
const |
|
inlineoverride |
◆ GetCounters()
const Counters& GetCounters |
( |
| ) |
const |
|
inlineoverride |
◆ GetCounterSet()
const CounterSet* GetCounterSet |
( |
uint16_t |
uid | ) |
const |
|
inlineoverride |
◆ GetCounterSetCount()
uint16_t GetCounterSetCount |
( |
| ) |
const |
|
inlineoverride |
◆ GetCounterSets()
const CounterSets& GetCounterSets |
( |
| ) |
const |
|
inlineoverride |
◆ GetDevice()
const Device* GetDevice |
( |
uint16_t |
uid | ) |
const |
|
inlineoverride |
◆ GetDeviceCount()
uint16_t GetDeviceCount |
( |
| ) |
const |
|
inlineoverride |
◆ GetDevices()
const Devices& GetDevices |
( |
| ) |
const |
|
inlineoverride |
◆ RegisterCategory()
const Category* RegisterCategory |
( |
const std::string & |
categoryName | ) |
|
|
inline |
Definition at line 454 of file ProfilingMocks.hpp.
457 CategoryPtr category = std::make_unique<Category>(categoryName);
458 ARM_PIPE_ASSERT(category);
461 const Category* categoryPtr = category.get();
462 ARM_PIPE_ASSERT(categoryPtr);
465 m_Categories.insert(std::move(category));
◆ RegisterCounter()
const Counter* RegisterCounter |
( |
const std::string & |
backendId, |
|
|
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 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() |
|
) |
| |
|
inline |
Definition at line 511 of file ProfilingMocks.hpp.
References armnn::IgnoreUnused().
527 uint16_t deviceCores = numberOfCores.has_value() ? numberOfCores.value() : 0;
530 uint16_t deviceUidValue = deviceUid.has_value() ? deviceUid.value() : 0;
533 uint16_t counterSetUidValue = counterSetUid.has_value() ? counterSetUid.value() : 0;
536 std::vector<uint16_t> counterUids = GetNextCounterUids(uid, deviceCores);
537 ARM_PIPE_ASSERT(!counterUids.empty());
538 uint16_t maxCounterUid = deviceCores <= 1 ? counterUids.front() : counterUids.back();
541 const std::string unitsValue = units.has_value() ? units.value() :
"";
544 CounterPtr counter = std::make_shared<Counter>(armnn::profiling::BACKEND_ID,
555 ARM_PIPE_ASSERT(counter);
558 const Counter* counterPtr = counter.get();
559 ARM_PIPE_ASSERT(counterPtr);
562 for (uint16_t counterUid : counterUids)
565 Category* parentCategory =
const_cast<Category*
>(
GetCategory(parentCategoryName));
566 ARM_PIPE_ASSERT(parentCategory);
567 parentCategory->m_Counters.push_back(counterUid);
570 m_Counters.insert(std::make_pair(counterUid, counter));
void IgnoreUnused(Ts &&...)
const Category * GetCategory(const std::string &name) const override
◆ RegisterCounterSet()
const CounterSet* RegisterCounterSet |
( |
const std::string & |
counterSetName, |
|
|
uint16_t |
count = 0 |
|
) |
| |
|
inline |
Definition at line 490 of file ProfilingMocks.hpp.
495 uint16_t counterSetUid = GetNextUid();
498 CounterSetPtr counterSet = std::make_unique<CounterSet>(counterSetUid, counterSetName, count);
499 ARM_PIPE_ASSERT(counterSet);
502 const CounterSet* counterSetPtr = counterSet.get();
503 ARM_PIPE_ASSERT(counterSetPtr);
506 m_CounterSets.insert(std::make_pair(counterSetUid, std::move(counterSet)));
508 return counterSetPtr;
◆ RegisterDevice()
const Device* RegisterDevice |
( |
const std::string & |
deviceName, |
|
|
uint16_t |
cores = 0 |
|
) |
| |
|
inline |
Definition at line 470 of file ProfilingMocks.hpp.
474 uint16_t deviceUid = GetNextUid();
477 DevicePtr device = std::make_unique<Device>(deviceUid, deviceName, cores);
478 ARM_PIPE_ASSERT(device);
481 const Device* devicePtr = device.get();
482 ARM_PIPE_ASSERT(devicePtr);
485 m_Devices.insert(std::make_pair(deviceUid, std::move(device)));
The documentation for this class was generated from the following file: