GetSurfaceAttributes#

Fully qualified name: cupva::mem::GetSurfaceAttributes

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

void cupva::mem::GetSurfaceAttributes(
const void *const devicePtr,
SurfaceAttributes &attr,
)#

Query the surface attributes for the given PVA pointer.

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 SurfaceAttributes struct.

Throws:
  • cupva::Exception(InvalidArgument) – The input device pointer value or type is invalid. The underlying pointer doesn’t describe a surface buffer type.

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