Function: value_write
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Usage
Writes data to the specified memory.
Prototype
- C Prototype
aclError aclrtValueWrite(void* devAddr, uint64_t value, uint32_t flag, aclrtStream stream)
- Python Function
1ret = acl.rt.value_write(dev_addr, value, flag, stream)
Parameter Description
Parameter |
Description |
|---|---|
dev_addr |
Int, device memory address. You need to allocate device memory in advance (for example, by calling acl.rt.malloc). The value of dev_addr must be 8-byte aligned. The valid memory bit width is 64 bits. |
value |
Int, data to be written to the memory. |
flag |
Int, reserved; fixed at 0. |
stream |
Int, stream. The value 0 can be passed, indicating that the default stream is used. |
Return Value Description
Return Value |
Description |
|---|---|
ret |
Int, error code: 0 on success; else, failure. |
Parent topic: Memory Management