{
auto nodes = stdex::make_unique<moco::tf::SymbolTable>();
auto input_names = stdex::make_unique<moco::tf::SymbolTable>();
+ auto updates = stdex::make_unique<moco::tf::UpdateQueue>();
- moco::tf::GraphBuilderContext gb_context(graph, nodes.get(), input_names.get());
+ moco::tf::GraphBuilderContext gb_context(graph, nodes.get(), input_names.get(), updates.get());
// Building a loco graph
// 1. Convert all the nodes to loco::Node
MapNameNode_t _namenode;
MapNodeNames_t _nodenames;
+ MapNameNode_t _table;
};
/**
class GraphBuilderContext
{
public:
- GraphBuilderContext(loco::Graph *g, SymbolTable *nodes, SymbolTable *input_names)
- : _g(g), _nodes(nodes), _input_names(input_names)
+ GraphBuilderContext(loco::Graph *g, SymbolTable *nodes, SymbolTable *input_names,
+ UpdateQueue *updates)
+ : _g(g), _nodes(nodes), _input_names(input_names), _updates(updates)
{
// DO NOTHING
}
loco::Graph *graph() { return _g; }
SymbolTable *nodes() { return _nodes; }
SymbolTable *input_names() { return _input_names; }
+ UpdateQueue *updates() { return _updates; }
private:
loco::Graph *_g;
SymbolTable *_nodes;
SymbolTable *_input_names;
+ UpdateQueue *_updates;
};
} // namespace tf
auto graph = loco::make_graph();
moco::tf::SymbolTable nodes;
moco::tf::SymbolTable input_names;
+ moco::tf::UpdateQueue updates;
- moco::tf::GraphBuilderContext context(graph.get(), &nodes, &input_names);
+ moco::tf::GraphBuilderContext context(graph.get(), &nodes, &input_names, &updates);
ASSERT_EQ(context.graph(), graph.get());
ASSERT_EQ(context.nodes(), &nodes);
ASSERT_EQ(context.input_names(), &input_names);
+ ASSERT_EQ(context.updates(), &updates);
}
TEST(SymbolTable, node_name)