Function: value_wait
Applicable Products
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
x |
|
x |
|
x |
Description
Unblocks the data in the specified memory when the data meets certain conditions.
Prototype
- C Prototype
aclError aclrtValueWait(void* devAddr, uint64_t value, uint32_t flag, aclrtStream stream)
- Python Function
1ret = acl.rt.value_wait(devAddr, value, flag, stream)
Parameters
Parameter |
Description |
|---|---|
devAddr |
Int, device memory address. The valid memory bit width of dev_addr is 64 bits. |
value |
Int, value to be compared with the data in the memory. |
flag |
Int, comparison mode. The data will be unblocked after the conditions are met. The options are as follows: ACL_STREAM_WAIT_VALUE_GEQ = 0x0; # Waits until (int64_t) (*devAddr- value) >= 0. ACL_STREAM_WAIT_VALUE_EQ = 0x1; # Waits until *devAddr == value. ACL_STREAM_WAIT_VALUE_AND = 0x2; # Waits until (*devAddr & value) != 0. ACL_STREAM_WAIT_VALUE_NOR = 0x3; # Waits until ~(*devAddr | value) != 0. |
stream |
Int, stream. The value 0 can be passed, indicating that the default stream is used. |
Return Values
Return Value |
Description |
|---|---|
ret |
Int, error code. 0 on success; else, failure. |