Function: memcpy
|
C Prototype |
aclError aclrtMemcpy(void *dst, size_t destMax, const void *src, size_t count, aclrtMemcpyKind kind) |
|---|---|
|
Python Function |
ret = acl.rt.memcpy(dst, dest_max, src, count, kind) |
|
Function Usage |
Copies memory. |
|
Input Description |
dst: pointer address of the destination memory address. dest_max: int, maximum memory length of the destination memory address, in bytes. src: pointer address of the source memory address. count: int, length of the copied memory, in bytes.
kind: int, memory copy type, reserved parameter. The enumerated values are invalid. The system determines whether the data from the source address can be copied to the destination address based on the pointer addresses of the source and destination memory addresses. If the data cannot be copied to the destination address, the system returns an error.
|
|
Return Value |
ret: int, error code.
|
|
Restrictions |
This API copies the memory immediately. No implicit device synchronization or stream synchronization is performed within the function. |
|
Reference |
Parent topic: Memory Management