aclrtSetOpWaitTimeout
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
☓ |
|
√ |
Description
Sets the timeout interval for waiting for the completion of a specified event.
If this API is not called, no timeout occurs by default. If this API is called multiple times in a process, the last configured interval is used.
Prototype
aclError aclrtSetOpWaitTimeout(uint32_t timeout)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
timeout |
Input |
Timeout, in seconds. The value 0 indicates no timeout. |
Returns
0 on success; else, failure. For details, see aclError.
Restrictions
After initialization by calling aclInit in a process, you can call aclrtSetOpWaitTimeout to set the timeout interval. Tasks delivered by calling aclrtStreamWaitEvent in the process can wait within the configured timeout interval. If the wait time exceeds the configured timeout interval, an error will be returned after a synchronization API (for example, aclrtSynchronizeStream) is called.