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

Class MutableFanoutView

tensorflow/core/grappler/utils/graph_view.h:172–200  ·  view source on GitHub ↗

MutableFanoutView is a helper class to represent fanins of a node. This holds a pointer to MutableGraphView, the index of the node from MutableGraphView being mutated, and the output index (hence is labeled as Fanout).

Source from the content-addressed store, hash-verified

170// a pointer to MutableGraphView, the index of the node from MutableGraphView
171// being mutated, and the output index (hence is labeled as Fanout).
172class MutableFanoutView
173 : public internal::NodeIndexAndPortIndex<MutableNodeView,
174 MutableGraphView> {
175 public:
176 MutableFanoutView() : NodeIndexAndPortIndex() {}
177
178 MutableFanoutView(MutableGraphView* graph_view, int node_index,
179 int port_index)
180 : NodeIndexAndPortIndex(graph_view, node_index, port_index) {}
181
182 explicit MutableFanoutView(MutableGraphView* graph_view, int node_index,
183 int port_index, int fanout_index)
184 : NodeIndexAndPortIndex(graph_view, node_index, port_index),
185 fanout_index_(fanout_index) {}
186
187 MutableFanoutView(MutableNodeView* node_view, int index);
188
189 private:
190 // Index of associated fanout in fanin's underlying MutableNodeView. For
191 // regular fanins, this will be the index of the associated fanout in
192 // MutableNodeView::regular_fanouts_by_port_[port_index]. For controlled
193 // fanins, this will be the index of the associated fanout in
194 // MutableNodeView::controlled_fanouts_.
195 int fanout_index_ = internal::kMissingIndex;
196
197 friend class MutableNodeView;
198 friend class MutableGraphView;
199 friend class Mutation;
200};
201
202// Mutable NodeView that holds a mutable NodeDef. This allows for lookups of
203// fanins and fanouts, and traversals of the graph. Control dependencies will be

Callers 2

Calls

no outgoing calls

Tested by 1