ONE - On-device Neural Engine
Loading...
Searching...
No Matches
logo::test Namespace Reference

Functions

template<typename T >
T * find_first_node_by_type (loco::Graph *g)
 

Function Documentation

◆ find_first_node_by_type()

template<typename T >
T * logo::test::find_first_node_by_type ( loco::Graph g)

Definition at line 27 of file TestHelper.h.

28{
29 T *first_node = nullptr;
30
31 for (auto node : loco::postorder_traversal(loco::output_nodes(g)))
32 {
33 first_node = dynamic_cast<T *>(node);
34 if (first_node != nullptr)
35 break;
36 }
37
38 return first_node;
39}

References loco::output_nodes(), and loco::postorder_traversal().