MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / HasFanout

Method HasFanout

tensorflow/core/grappler/utils/graph_view.cc:56–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56bool NodeView::HasFanout(const FaninView& fanout) const {
57 if (fanout.index() < Graph::kControlSlot ||
58 graph_view_ != fanout.graph_view_) {
59 return false;
60 }
61 NodeView* view = fanout.node_view();
62 if (view == nullptr) {
63 return false;
64 } else if (fanout.index() == Graph::kControlSlot) {
65 return view->fanins_set_.contains({this->node(), Graph::kControlSlot});
66 } else if (fanout.index() >= view->regular_fanins_.size()) {
67 return false;
68 }
69 return view->regular_fanins_[fanout.index()].node_index_ == node_index_;
70}
71
72inline const FanoutView& NodeView::GetMissingFanin() const {
73 return graph_view_->missing_fanin_;

Callers 4

TYPED_TESTFunction · 0.80

Calls 5

nodeMethod · 0.95
node_viewMethod · 0.80
containsMethod · 0.80
indexMethod · 0.45
sizeMethod · 0.45

Tested by 4

TYPED_TESTFunction · 0.64