|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Delivers a callback task in the task queue of the stream in the asynchronous task scenario. When the callback task is executed in the system, it is also executed in the thread subscribed to on the stream (acl.rt.subscribe_report). This API is asynchronous.
1
|
aclError aclrtLaunchCallback(aclrtCallback fn, void *userData, aclrtCallbackBlockType blockType, aclrtStream stream) |
1
|
ret = acl.rt.launch_callback(fn, user_data_list, block_type, stream) |
|
Parameter |
Description |
|---|---|
|
fn |
Function, callback function on the Python side. |
|
user_data_list |
List, parameters to be transferred to the callback function. Currently, data of the list type is transferred. |
|
block_type |
Int, whether the callback task blocks subsequent tasks in the stream.
|
|
stream |
Int, stream. |
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code. 0 on success; else, failure. |
This API is asynchronous. The API call delivers a task rather than executes a task. After this API is called, call the synchronization API (for example, acl.rt.synchronize_stream) to ensure that the task is complete.