aclrtValueWait
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
x |
|
|
x |
|
|
x |
Function
Unblocks the data in the specified memory when the data meets certain conditions. This API is asynchronous.
Prototype
1
|
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 options are as follows: #define ACL_STREAM_WAIT_VALUE_GEQ 0x00000000U // Wait until (int64_t) (*devAddr – value) >= 0. #define ACL_STREAM_WAIT_VALUE_EQ 0x00000001U // Wait until *devAddr == value. #define ACL_STREAM_WAIT_VALUE_AND 0x00000002U // Wait until (*devAddr & value) != 0. #define ACL_STREAM_WAIT_VALUE_NOR 0x00000003U // Wait until ~(*devAddr | value) != 0 |
|
stream |
Input |
Stream for executing the waiting task. For the type definition, see aclrtStream. The value NULL is supported, indicating that the default stream is used. |
Returns
0 on success; otherwise, failure. For details, see aclError.