aclrtMemcpyAsyncWithOffset

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Copies memory in scenarios where the base address is a level-2 pointer and an address offset exists. This API is asynchronous.

Prototype

aclError aclrtMemcpyAsyncWithOffset(void **dst, size_t destMax, size_t dstDataOffset, const void **src, size_t count, size_t srcDataOffset, aclrtMemcpyKind kind, aclrtStream stream)

Parameters

Parameter

Input/Output

Description

dst

Input

Pointer to the destination memory address.

destMax

Input

Memory size in bytes in the destination address

dstDataOffset

Input

Offset of the destination memory address.

src

Input

Pointer to the source memory address.

count

Input

Size in bytes to copy.

srcDataOffset

Input

Offset of the source memory address.

kind

Input

Memory copy type.

Currently, only ACL_MEMCPY_INNER_DEVICE_TO_DEVICE is supported, indicating memory copy within a device.

stream

Input

Stream for executing the memory copy task.

Returns

0 on success; else, failure. For details, see aclError.