GetIntAttrVal

Function Usage

Obtains the attribute value of the integer type of an operator.

Prototype

1
bool GetIntAttrVal(const char *attr_name, int64_t &val) const

Parameters

Parameter

Input/Output

Description

attr_name

Input

Attribute name.

val

Output

Obtained integer value.

Returns

A value indicating whether the attribute is successfully obtained.

Constraints

None

Examples

1
2
3
4
5
6
bool GetIntAttrVal(ExeResGenerationContext* context) {
  std::string attr_name = "";
  int64_t val; 
  auto result = context->GetStrAttrVal(attr_name.c_str(),val);
  // ...
}