MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / get_profiler

Method get_profiler

tests/framework/Framework.cpp:695–723  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693}
694
695Profiler Framework::get_profiler() const
696{
697 Profiler profiler;
698
699 const bool all_instruments =
700 std::any_of(_instruments.begin(), _instruments.end(),
701 [](InstrumentsDescription type) -> bool { return type.first == InstrumentType::ALL; });
702
703 auto is_selected = [&](InstrumentsDescription instrument) -> bool
704 {
705 return std::find_if(_instruments.begin(), _instruments.end(),
706 [&](InstrumentsDescription type) -> bool
707 {
708 const auto group =
709 static_cast<InstrumentType>(static_cast<uint64_t>(type.first) & 0xFF00);
710 return (group == instrument.first) && (instrument.second == type.second);
711 }) != _instruments.end();
712 };
713
714 for (const auto &instrument : _available_instruments)
715 {
716 if (all_instruments || is_selected(instrument.first))
717 {
718 profiler.add(instrument.second());
719 }
720 }
721
722 return profiler;
723}
724
725void Framework::add_printer(Printer *printer)
726{

Callers 1

mainFunction · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected