MCPcopy Create free account
hub / github.com/OAID/Tengine / AddGraphAttr

Function AddGraphAttr

core/lib/static_graph.cpp:119–129  ·  view source on GitHub ↗

if attr_name exist, return false

Source from the content-addressed store, hash-verified

117
118// if attr_name exist, return false
119bool AddGraphAttr(StaticGraph* graph, const std::string& attr_name, any&& value)
120{
121 Attribute& attrs = graph->attrs;
122
123 if(attrs.ExistAttr(attr_name))
124 return false;
125
126 attrs.SetAttr(attr_name, std::move(value));
127
128 return true;
129}
130
131StaticNode* FindNode(StaticGraph* graph, const std::string& node_name)
132{

Callers

nothing calls this directly

Calls 2

ExistAttrMethod · 0.45
SetAttrMethod · 0.45

Tested by

no test coverage detected