Skip to content

GpaGetSampleId

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

Syntax

GpaStatus GpaGetSampleId(
GpaSessionId session_id,
GpaUInt32 index,
GpaUInt32* sample_id);

Description

Gets the sample id of the sample with the specified index. This is useful if sample ids are either non-zero-based or non-consecutive.

Parameters

NameDescription
session_idUnique identifier of a previously-created session.
indexZero-based index of the sample whose sample id is needed. Must lie between 0 and (GpaGetSampleCount result - 1).
sample_idThe value that will hold the id of the sample upon successful execution.

Return value

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

The supplied sample_id parameter is NULL. | | kGpaStatusErrorSessionNotFound | The supplied session_id parameter was not recognized as a previously-created session identifier. | | kGpaStatusErrorSessionNotStarted | The session has not been started. | | kGpaStatusErrorSampleNotFound | The specified sample could not be found. | | kGpaStatusErrorException | Exception occurred. |