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

Method MaybeCopyOnWrite

tensorflow/core/graph/graph.cc:222–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222void Node::MaybeCopyOnWrite() {
223 // NodeProperties may be shared between Nodes. Make a copy if so.
224 if (!props_.unique()) {
225 props_ = std::make_shared<NodeProperties>(*props_);
226 }
227}
228
229AttrValue* Node::AddAttrHelper(const string& name) {
230 MaybeCopyOnWrite();

Callers 5

CopyNodeMethod · 0.80
AddControlEdgeMethod · 0.80
RemoveControlEdgeMethod · 0.80
UpdateEdgeMethod · 0.80
AddWhileInputHackMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected