This is a static copy of a profile report

Home

Function details for gpuDeviceCountThis is a static copy of a profile report

Home

gpuDeviceCount (Calls: 1, Time: 0.004 s)
Generated 19-Jun-2021 04:39:08 using performance time.
function in file /nfs/linux/matlab-2019b/toolbox/parallel/gpu/gpuDeviceCount.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
cnn_train>parametersubfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
14
n = parallel.internal.gpudevic...
10.004 s98.8%
17
end
10.000 s0.7%
13
try
10.000 s0.1%
All other lines  0.000 s0.5%
Totals  0.004 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function17
Non-code lines (comments, blank lines)12
Code lines (lines that can run)5
Code lines that did run3
Code lines that did not run2
Coverage (did run/can run)60.00 %
Function listing
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.