Function: get_context

Description

Obtains the context of a thread.

Prototype

  • C Prototype
    1
    aclError aclrtGetCurrentContext(aclrtContext context)
    
  • Python Function
    1
    context, ret = acl.rt.get_context()
    

Parameters

None

Return Value

Return Value

Description

context

Int, pointer address of the created context object.

ret

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

Restrictions

If you call acl.rt.set_context multiple times to set the context of the current thread, the context set last time is obtained.