| 227 | } |
| 228 | |
| 229 | void ProfilerImpl::EndEvent(Event* event) |
| 230 | { |
| 231 | event->Stop(); |
| 232 | |
| 233 | if (!!m_Parents.empty()) |
| 234 | { |
| 235 | throw armnn::Exception("m_Parents must not be empty."); |
| 236 | } |
| 237 | |
| 238 | if (event != m_Parents.top()) |
| 239 | { |
| 240 | throw armnn::Exception("event must match the top of m_Parents."); |
| 241 | } |
| 242 | |
| 243 | m_Parents.pop(); |
| 244 | |
| 245 | Event* parent = m_Parents.empty() ? nullptr : m_Parents.top(); |
| 246 | |
| 247 | if (event->GetParentEvent() != parent) |
| 248 | { |
| 249 | throw armnn::Exception("parent events must match."); |
| 250 | } |
| 251 | |
| 252 | #if ARMNN_STREAMLINE_ENABLED |
| 253 | ANNOTATE_CHANNEL_END(uint32_t(m_Parents.size())); |
| 254 | #endif |
| 255 | } |
| 256 | |
| 257 | int CalcLevel(const Event* eventPtr) |
| 258 | { |
no test coverage detected