Function: set_attr_bool

Applicable Products

  • Ascend 950PR&950DT products: Supported
  • Atlas A3 products: Supported
  • Atlas A2 products: Supported
  • Atlas 200I/500 A2 inference products: Supported
  • Atlas inference products: Supported
  • Atlas training products: Supported

Function

Sets the value (a scalar of the bool type) of an attribute.

Prototype

  • C Prototype

    aclError aclopSetAttrBool(aclopAttr *attr, const char *attrName, uint8_t attrValue)
    
  • Python Function

    ret = acl.op.set_attr_bool(attr, attr_name, attr_value)
    

Parameters

Parameter Description
attr Int, pointer address of the data of the aclopAttr type. Call acl.op.create_attr to create data of the aclopAttr type in advance.
attr_name Str, attribute name.
attr_value Int, attribute value.

Return Values

Return Value Description
ret Int, error code.
0: success
Other values: failure