GetGpuCount Data Member Function

Returns the number of GPUs on the device where the application is running.

Prototype

int32 GetGpuCount()

Examples

Copy Text To Clipboard

auto BaseSystemInformation a_oBaseInfo;
auto StrList a_slMessages;
a_slMessages.AddBlank();
a_slMessages.Add( "GPU Count: " + a_oBaseInfo.GetGpuCount() );

for( int i = 0; i < a_oBaseInfo.GetGpuCount(); ++i )
{
   a_slMessages.Add( "GPU RAM: " + a_oBaseInfo.GetGpuRam( i ) + " MB" );
}

LibStrList.Out( a_slMessages );

Results

GPU Count: 2
GPU RAM: 1024 MB
GPU RAM: 4095 MB