GetAttrValue
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File
- Header file: #include <graph/attr_value.h>
- Library file: libgraph_base.so
Function Usage
Obtains an attribute value. Generic class, which carries the specific attribute type.
Prototype
1 2 3 4 5 6 7 8 9 10 11 12 13 | graphStatus GetAttrValue(int64_t &attr_value) const graphStatus GetAttrValue(float32_t &attr_value) const graphStatus GetAttrValue(AscendString &attr_value) const graphStatus GetAttrValue(bool &attr_value) const graphStatus GetAttrValue(Tensor &attr_value) const graphStatus GetAttrValue(std::vector<int64_t> &attr_value) const graphStatus GetAttrValue(std::vector<float32_t> &attr_value) const graphStatus GetAttrValue(std::vector<AscendString> &attr_values) const graphStatus GetAttrValue(std::vector<bool> &attr_value) const graphStatus GetAttrValue(std::vector<Tensor> &attr_value) const graphStatus GetAttrValue(std::vector<std::vector<int64_t>> &attr_value) const graphStatus GetAttrValue(std::vector<ge::DataType> &attr_value) const graphStatus GetAttrValue(ge::DataType &attr_value) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
attr_value |
Output |
Specific attribute value. |
Returns
graphStatus type. GRAPH_SUCCESS on success; GRAPH_FAILED on failure.
Exception Handling
None
Constraints
None
Parent topic: AttrValue