Skip to content

GpaGetCounterSampleType

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

Syntax

GpaStatus GpaGetCounterSampleType(
GpaSessionId session_id,
GpaUInt32 index,
GpaCounterSampleType* counter_sample_type);

Description

Gets the sample type of the specified counter.

Parameters

NameDescription
session_idUnique identifier of a previously-created session.
indexThe index of the counter whose sample type is needed. Must lie between 0 and (GpaGetNumCounters result - 1).
counter_sample_typeThe address which will hold the sample type upon successful execution.

Return value

Return valueDescription
kGpaStatusOkThe counter sample type was successfully retrieved.
kGpaStatusErrorGpaNotInitializedGPA was not initialized. Call GpaInitialize before all other entrypoints.
kGpaStatusErrorNullPointerThe supplied counter_sample_type parameter is NULL.

The supplied session_id parameter is NULL. | | kGpaStatusErrorSessionNotFound If the supplied session_id is invalid. | | | kGpaStatusErrorIndexOutOfRange | The specified index is out of range. | | kGpaStatusErrorFailed | The counter sample type could not be retrieved. | | kGpaStatusErrorException | Exception occurred. |