sanitizerRtMemcpyAsync

Function

Calls the aclrtMemcpyAsync interface to copy the memory and reports the memory copy information to the detection tool. This interface is an asynchronous interface. The actual memory copy behavior and parameter meanings are the same as those of aclrtMemcpyAsync.

For details about aclrtMemcpyAsync, see .

Prototype

aclError sanitizerRtMemcpyAsync(void *dst, size_t destMax, const void *src, size_t count, aclrtMemcpyKind kind, aclrtStream stream, char const *filename, int lineno);

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

dst

Input

Pointer to the destination memory address.

destMax

Input

Maximum size of the destination memory address, in bytes.

src

Input

Pointer to the source memory address.

count

Input

Size in bytes to copy.

kind

Input

Reserved. The system determines whether to copy data from the source address to the destination address based on the pointer to the source and destination memory address. If not, an error is reported.

stream

Input

Stream specified by the current memory copy behavior.

filename

Input

Name of the file where memory copy is called.

lineno

Input

Number of the line where memory copy is called.

Return

0 on success; else, failure.

Examples

For details, see Step 4.