aclrtValueWait
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
☓ |
|
☓ |
|
☓ |
Description
Unblocks the data in the specified memory when the data meets certain conditions. This API is asynchronous.
Prototype
aclError aclrtValueWait(void* devAddr, uint64_t value, uint32_t flag, aclrtStream stream)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
devAddr |
Input |
Memory address on the device. The valid memory bit width of devAddr is 64 bits. |
value |
Input |
Value to be compared with the data in the memory. |
flag |
Input |
Comparison mode. The data will be unblocked after the conditions are met. The values are as follows: ACL_VALUE_WAIT_GEQ = 0x0; // Waits until (int64_t) (*devAddr- value) >= 0. ACL_VALUE_WAIT_EQ = 0x1; // Waits until *devAddr == value. ACL_VALUE_WAIT_AND = 0x2; // Waits until (*devAddr & value) != 0. ACL_VALUE_WAIT_NOR = 0x3; // Waits until ~(*devAddr | value) != 0. |
stream |
Input |
Stream for executing the wait task. The value NULL is supported, indicating that the default stream is used. |
Returns
0 on success; else, failure. For details, see aclError.