Main Content

gpuDeviceCount

Number of GPU devices present

Syntax

n = gpuDeviceCount

Description

n = gpuDeviceCount returns the number of GPU devices found 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
Introduced in R2010b