aclrtProcessHostFunc

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

X

Atlas A3 training products/Atlas A3 inference products

X

Atlas A2 training products/Atlas A2 inference products

X

Atlas 200I/500 A2 inference products

X

Atlas inference products

X

Atlas training products

X

Function

Triggers callback handling after a specified period. The thread specified by aclrtSubscribeHostFunc handles the callback.

You need to create a thread in advance and customize the thread function. This API is called in the thread function. After a specified period of time, the operator computation is performed in the system.

Prototype

1
aclError aclrtProcessHostFunc(int32_t timeout)

Parameters

Parameter

Input/Output

Description

timeout

Input

Timeout period (ms).

Value range:

  • –1: infinite wait.
  • Values greater than 0 (excluding 0): the wait period.

Returns

0 on success; otherwise, failure. For details, see aclError.