sanitizerRtMemcpy2d

Function

Calls the aclrtMemcpy2d interface to copy the matrix data memory and reports the memory copy information to the detection tool. The actual memory copy behavior and parameter meanings of matrix data are the same as those of aclrtMemcpy2d.

For details about aclrtMemcpy2d, see .

Prototype

aclError sanitizerRtMemcpy2d(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, aclrtMemcpyKind kind, char const *filename, int lineno);

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

dst

Input

Pointer to the destination memory address.

dpitch

Input

Address distance between two adjacent columns of vectors in the destination memory.

src

Input

Pointer to the source memory address.

spitch

Input

Address distance between two adjacent columns of vectors in the source memory.

width

Input

Matrix width to be copied.

height

Input

Matrix height to be copied.

The maximum height can be set to 5242880 (5 x 1024 x 1024). Otherwise, a failure is returned.

kind

Input

Memory copy kind.

filename

Input

Name of the file where matrix data memory copy is called.

lineno

Input

Number of the line where matrix data memory copy is called.

Return

0 on success; else, failure.

Examples

For details, see Step 4.