aclrtSubscribeHostFunc
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
X |
X |
|
X |
|
X |
|
X |
|
X |
Description
Subscribes to a thread you have created for processing the callback function in a stream.
Prototype
1 | aclError aclrtSubscribeHostFunc(uint64_t hostFuncThreadId, aclrtStream exeStream) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
hostFuncThreadId |
Input |
Thread ID. |
exeStream |
Input |
Stream. For details about the type definition, see aclrtStream. |
Returns
0 on success; otherwise, 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: Other APIs