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

Method HandlePacket

src/profiling/test/RequestCountersPacketHandler.cpp:27–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void RequestCountersPacketHandler::HandlePacket(const arm::pipe::Packet& packet)
28{
29 if (packet.GetHeader() != m_CounterDirectoryMessageHeader)
30 {
31 return;
32 }
33 arm::pipe::PacketVersionResolver packetVersionResolver;
34 DirectoryCaptureCommandHandler directoryCaptureCommandHandler(
35 "ARMNN", 0, 2, packetVersionResolver.ResolvePacketVersion(0, 2).GetEncodedValue());
36 directoryCaptureCommandHandler.operator()(packet);
37 const ICounterDirectory& counterDirectory = directoryCaptureCommandHandler.GetCounterDirectory();
38 for (auto& category : counterDirectory.GetCategories())
39 {
40 // Remember we need to translate the Uid's from our CounterDirectory instance to the parent one.
41 std::vector<uint16_t> translatedCounters;
42 for (auto const& copyUid : category->m_Counters)
43 {
44 translatedCounters.emplace_back(directoryCaptureCommandHandler.TranslateUIDCopyToOriginal(copyUid));
45 }
46 m_IdList.insert(std::end(m_IdList), std::begin(translatedCounters), std::end(translatedCounters));
47 }
48 SendCounterSelectionPacket();
49}
50
51void RequestCountersPacketHandler::SendCounterSelectionPacket()
52{

Callers

nothing calls this directly

Calls 7

endFunction · 0.85
beginFunction · 0.85
GetHeaderMethod · 0.80
GetEncodedValueMethod · 0.80
ResolvePacketVersionMethod · 0.80
operator()Method · 0.45

Tested by

no test coverage detected