Documentation

gpuDeviceCount

Number of GPU devices present

Syntax

n = gpuDeviceCount

Description

n = gpuDeviceCount returns the number of GPU devices present in your computer.

Examples

Determine how many GPU devices you have available in your computer and examine the properties of each.

n = gpuDeviceCount;
for ii = 1:n
    gpuDevice(ii)
end
Was this topic helpful?