GetPointerAttributes#

Fully qualified name: cupva::mem::GetPointerAttributes

Defined in src/host/cpp_api/include/cupva_host.hpp

void cupva::mem::GetPointerAttributes(
const void *const devicePtr,
PointerAttributes &attr,
)#

Query the pointer attributes for the given PVA pointer.

Host pointer associated with the given device pointer is populated only when the device pointer is mappable. Otherwise it is set to nullptr. See cupva::mem::GetHostPointer for details.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: Yes

    • Runtime: No

    • De-Init: No

Parameters:
  • devicePtr[in] The input device pointer which can only be accessed by PVA.

  • attr[out] The reference to a PointerAttributes struct.

Throws:
  • cupva::Exception(InvalidArgument) – The input device pointer is invalid.

  • cupva::Exception(DriverAPIError) – Getting pointer attributes failed due to driver API error.

  • cupva::Exception(NotAllowedInOperationalState) – if current context is null and default context does not exist and NVIDIA DRIVE OS VM state is “Operational”