aclrtMemSetAccess

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function

Sets the memory access permission.

Prototype

1
aclError aclrtMemSetAccess(void* virPtr, size_t size, aclrtMemAccessDesc* desc, size_t count)

Parameters

Parameter

Input/Output

Description

virPtr

Input

Start address of the virtual memory.

The value must be the same as the aclrtMapMem API's virPtr address.

size

Input

Length of the virtual memory.

The value must be the same as the aclrtMapMem API's size.

desc

Input

Memory access configuration, including access protection flag and memory location. For the type definition, see aclrtMemAccessDesc.

count

Input

Length of the desc array.

Returns

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

API Call Example

For the API call example, see Interprocess communication.