aclrtMemManagedGetAttr

Note: This API is reserved and is not supported currently.

Function

Queries a policy attribute value of the UVM of a specified size.

The memory operated by this API must be allocated using aclrtMemAllocManaged. If the queried memory range contains inconsistent policy attribute values, the result will be invalid.

Unlike the aclrtMemManagedGetAttrs API, this API can query the value of only one memory policy attribute at a time.

Prototype

1
aclError aclrtMemManagedGetAttr(aclrtMemManagedRangeAttribute attribute, const void *ptr, size_t size, void *data, size_t dataSize)

Parameters

Parameter

Input/Output

Description

attribute

Input

Attribute to be queried. For details about the type definition, see aclrtMemManagedRangeAttribute.

ptr

Input

Start address of the memory whose attribute is to be queried. The address range must be within the UVM memory range, that is, [0x90000000000ULL, 0x90000000000ULL + 3 TB).

size

Input

Size of the memory whose attribute is to be queried, in bytes. The value range is (0, 3 TB].

data

Output

Query result.

dataSize

Input

Size of the memory for storing the query result, in bytes.

Returns

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