Skip to content

GpaGetUsageTypeAsStr

Copyright (c) 2018-2021 Advanced Micro Devices, Inc. All rights reserved.

Syntax

GpaStatus GpaGetUsageTypeAsStr(
GpaUsageType counter_usage_type,
const char** usage_type_str);

Description

Gets a string representation of the specified counter usage type. This could be used to display counter units along with their name or value. For example, the kGpaUsageTypePercentage usage_type_str would return “percentage”.

Parameters

NameDescription
counter_usage_typeThe usage type whose string representation is needed.
usage_type_strThe address which will hold the string representation upon successful execution.

Return value

Return valueDescription
kGpaStatusOkThe string representation was successfully retrieved.
kGpaStatusErrorNullPointerThe supplied usage_type_str parameter is NULL.
kGpaStatusErrorInvalidParameterThe counter_usage_type parameter has an invalid value.
kGpaStatusErrorExceptionException occurred.