GetAttr
产品支持情况
头文件/库文件
- 头文件:#include <graph/graph.h>
- 库文件:libgraph.so
功能说明
获取Graph的属性,泛型属性接口,属性的类型为attr_value。
函数原型
graphStatus GetAttr(const AscendString &name, AttrValue &attr_value) const
参数说明
返回值说明
约束说明
无
调用示例
AttrValue av_get;
graph.GetAttr("int_attr", av_get);
int64_t int_attr_get{};
av_get.GetAttrValue(int_attr_get);
ASSERT_EQ(int_attr_get, 100);