aclrtSubscribeHostFunc
Applicability
Product |
Supported |
|---|---|
☓ |
|
☓ |
|
☓ |
|
☓ |
|
☓ |
Description
Subscribes to a thread you have created for processing the callback function in a stream.
Prototype
aclError aclrtSubscribeHostFunc(uint64_t hostFuncThreadId, aclrtStream exeStream)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
hostFuncThreadId |
Input |
Thread ID. |
exeStream |
Input |
Stream. |
Returns
0 on success; else, failure. For details, see aclError.
Restrictions
- aclrtSubscribeHostFunc can be called multiple times to subscribe to the same thread for processing the callback function in multiple streams of the same device.
- To ensure that tasks in a stream can be executed in order, aclrtSubscribeHostFunc cannot be called to subscribe to multiple threads for processing more than one callback function in the same stream.
Parent topic: Execution Control