Function: destroy_context

Description

Destroys a context and cleans up the associated resources. Only the context created by calling acl.rt.create_context can be destroyed.

Prototype

  • C Prototype
    1
    aclError aclrtDestroyContext(aclrtContext context)
    
  • Python Function
    1
    ret = acl.rt.destroy_context(context)
    

Parameters

Parameter

Description

context

Int, pointer address of the context object to be destroyed.

Return Value

Return Value

Description

ret

Int, error code. 0 on success; else, failure.

Reference

For details about the API call sequence and examples, see Runtime Resource Allocation and Deallocation and Synchronous Wait.