time | Calls | line |
---|
| | 1 | function n = gpuDeviceCount
|
| | 2 | %GPUDEVICECOUNT - return how many GPU devices are present
|
| | 3 | % N = GPUDEVICECOUNT returns how many GPU devices are present in your
|
| | 4 | % system. gpuDeviceCount only counts GPU devices supported by your
|
| | 5 | % graphics driver.
|
| | 6 | %
|
| | 7 | % See also gpuDevice, parallel.gpu.GPUDevice, parallel.gpu.CUDADevice.
|
| | 8 |
|
| | 9 | % Copyright 2010-2018 The MathWorks, Inc.
|
| | 10 |
|
| | 11 | % This can't be allowed to fail. If CUDA isn't available or there's some
|
| | 12 | % other problem we catch it and return 0
|
< 0.001 | 1 | 13 | try
|
0.004 | 1 | 14 | n = parallel.internal.gpudeviceinfo.gpuDeviceCount;
|
| | 15 | catch err %#ok<NASGU>
|
| | 16 | n = 0;
|
< 0.001 | 1 | 17 | end
|
Other subfunctions in this file are not included in this listing.