Function gpa::metrics::GetGpusAvailable

Function Documentation

Result gpa::metrics::GetGpusAvailable(uint32_t *pGpuInfoCount, gpa::metrics::GpuInfo *pGpuInfos)

Used to determine the id and other key info for each active available GPU.

Parameters
  • pGpuInfoCount -- [inout] Pointer to a variable related to the number of active GPUs available, or GpuInfo structs to be obtain and pointed to by pGpuInfos. Review return notes for usage details.

  • pGpuInfos -- [inout] Pointer to an array of GpuInfo structs. Review return notes for usage details.

Returns

Upon success, kSuccess or kIncomplete is returned. If pGpuInfos is null, the value pointed to by pGpuInfoCount is set to the number of available GPUs and kSuccess is returned. If non-null, the value pointed to by pGpuInfoCount must equal the number of elements in the pGpuInfos array, and upon return it is set to the number of GpuInfo structs copied to pGpuInfos. When the array is not large enough to copy all of them, kIncomplete is returned instead of kSuccess.