aclrtSynchronizeDevice
Applicable Products
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Blocks the current thread until the device corresponding to the context bound to the current thread completes the computation.
This is an encapsulated API that applies only to C++ programs. It internally calls the C API aclrtSynchronizeDeviceWithTimeout.
Prototype
1 | aclError aclrtSynchronizeDevice(int32_t timeout) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
timeout |
Input |
API timeout interval. The value can be:
|
Returns
0 on success; otherwise, failure. For details, see aclError.
Parent topic: C++ Extension APIs