This is a static copy of a profile report

Home

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

Home

gpu (Calls: 6548, Time: 4.827 s)
Generated 19-Jun-2021 04:39:10 using performance time.
function in file /nfs/inm_phd/07/d07944009/2021/0618-proj6/simpleNN/MATLAB/cnn/gpu.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
train>init_modelsubfunction8
find_index_phiZfunction24
fungrad_minibatchfunction48
lossgrad_subsetfunction649
feedforwardfunction654
padding_and_phiZ>paddingsubfunction1962
maxpoolingfunction1962
vTPfunction1077
CGfunction15
Jacobian>cal_dzdSsubfunction5
CG>JTBJvsubfunction144
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
14
M = fun_arr(dim, float_type);
28274.396 s91.1%
3
global gpu_use
65480.275 s5.7%
4
global float_type
65480.046 s1.0%
18
end
65480.028 s0.6%
6
if gpu_use
65480.011 s0.2%
All other lines  0.070 s1.5%
Totals  4.827 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function18
Non-code lines (comments, blank lines)3
Code lines (lines that can run)15
Code lines that did run10
Code lines that did not run5
Coverage (did run/can run)66.67 %
Function listing
time 
Calls 
 line
   1 
function M = gpu(fun_arr, dim)
   2 

  0.275 
   6548 
   3
global gpu_use 
  0.046 
   6548 
   4
global float_type 
   5 

  0.011 
   6548 
   6
if gpu_use 
   7 
	if isa(fun_arr,'function_handle')
   8 
		M = fun_arr(dim, float_type, 'gpuArray');
   9 
	else
  10 
		M = gpuArray(fun_arr);
  11 
	end
< 0.001 
   6548 
  12
else 
  0.002 
   6548 
  13
	if isa(fun_arr,'function_handle') 
  4.396 
   2827 
  14
		M = fun_arr(dim, float_type); 
< 0.001 
   3721 
  15
	else 
< 0.001 
   3721 
  16
		M = fun_arr; 
  0.001 
   6548 
  17
	end 
  0.028 
   6548 
  18
end 

Other subfunctions in this file are not included in this listing.