17#ifndef __TEST_HELPER_H__
18#define __TEST_HELPER_H__
29 T *first_node =
nullptr;
31 uint32_t count = nodes->
size();
33 for (uint32_t i = 0; i < count; ++i)
35 first_node =
dynamic_cast<T *
>(nodes->
at(i));
36 if (first_node !=
nullptr)
45 std::vector<T *> find_nodes;
47 uint32_t count = nodes->
size();
49 for (uint32_t i = 0; i < count; ++i)
51 auto node =
dynamic_cast<T *
>(nodes->
at(i));
53 find_nodes.push_back(node);
Logical unit of computation.
T * at(uint32_t n) const
Access N-th object.
uint32_t size(void) const
Return the number of objects.
T * find_first_node_bytype(loco::Graph *g)
void setup_output_node(loco::Graph *graph, loco::Node *last_node)
Append setup output of graph by adding loco::Push node.
std::vector< T * > find_nodes_bytype(loco::Graph *g)