MCPcopy Create free account
hub / github.com/ARM-software/armnn / GetFunctor

Method GetFunctor

profiling/common/src/CommandHandlerRegistry.cpp:36–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36CommandHandlerFunctor* CommandHandlerRegistry::GetFunctor(uint32_t familyId,uint32_t packetId, uint32_t version) const
37{
38 CommandHandlerKey key(familyId, packetId, version);
39
40 // Check that the requested key exists
41 if (registry.find(key) == registry.end())
42 {
43 std::stringstream ss;
44 ss << "Functor with requested PacketId=" << packetId << " and Version=" << version << " does not exist";
45 throw ProfilingException(ss.str());
46 }
47
48 CommandHandlerFunctor* commandHandlerFunctor = registry.at(key);
49 if (commandHandlerFunctor == nullptr)
50 {
51 std::stringstream ss;
52 ss << "Invalid functor registered for PacketId=" << packetId << " and Version=" << version;
53 throw ProfilingException(ss.str());
54 }
55
56 return commandHandlerFunctor;
57}
58
59} // namespace pipe
60

Callers 3

HandleCommandsMethod · 0.80
ProfilingTests.cppFile · 0.80
ReceiveLoopMethod · 0.80

Calls 3

ProfilingExceptionClass · 0.85
endMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected