ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci::IndexNodeFinder Class Reference

#include <GraphBuilderContext.h>

Public Member Functions

void enroll (TensorIndex idx, CircleNode *node)
 
CircleNodenode (TensorIndex idx) const
 

Detailed Description

Definition at line 38 of file GraphBuilderContext.h.

Member Function Documentation

◆ enroll()

void luci::IndexNodeFinder::enroll ( TensorIndex  idx,
CircleNode node 
)

Definition at line 26 of file GraphBuilderContext.cpp.

27{
28 auto iter = _table.find(idx);
29 if (iter != _table.end())
30 {
31 LOGGER(l);
32 INFO(l) << "[luci] NodeFinder SKIP (" << idx << ") " << node << ":" << node->name()
33 << " existing: " << iter->second << ":" << iter->second->name() << std::endl;
34 return;
35 }
36
37 _table[idx] = node;
38}
#define LOGGER(name)
Definition Log.h:65
#define INFO(name)
Definition Log.h:68
CircleNode * node(TensorIndex idx) const
NodeName name(void) const

References INFO, LOGGER, luci::CircleNode::name(), and node().

Referenced by luci::GraphBuilder::build(), luci::GraphBuilderMultiOutput::build(), and luci::CircleWhileGraphBuilder::build().

◆ node()

CircleNode * luci::IndexNodeFinder::node ( TensorIndex  idx) const

Definition at line 40 of file GraphBuilderContext.cpp.

41{
42 MapIndexNode_t::const_iterator iter = _table.find(idx);
43
44 // dangle output node may exist that are not enrolled
45 return (iter != _table.end()) ? iter->second : nullptr;
46}

Referenced by luci::GraphBuilder::build(), luci::GraphBuilderMultiOutput::build(), luci::CircleWhileGraphBuilder::build(), and enroll().


The documentation for this class was generated from the following files: