Skip to content

GpaGetCounterIndex

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

Syntax

GpaStatus GpaGetCounterIndex(
GpaSessionId session_id,
const char* counter_name,
GpaUInt32* index);

Description

Gets index of a counter given its name (case insensitive).

Parameters

NameDescription
session_idUnique identifier of a previously-created session.
counter_nameThe name of the counter whose index is needed.
indexThe address which will hold the index upon successful execution.

Return value

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

The supplied index parameter is NULL.

The supplied session_id parameter is NULL. | | kGpaStatusErrorSessionNotFound If the supplied session_id is invalid. | | | kGpaStatusErrorCounterNotFound | The specified counter could not be found. | | kGpaStatusErrorException | Exception occurred. |