This is a static copy of a profile report

Home

imresize>parsePreMethodArgs (82820 calls, 17.034 sec)
Generated 05-Nov-2014 07:52:46 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/imresize.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imresize>parseInputssubfunction82820
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
354
[scale, output_size] = scaleOr...
828206.149 s36.1%
333
iptcheckinput(A, {'numeric', '...
828202.043 s12.0%
340
if size(args{next_arg},2) == 3
828201.342 s7.9%
357
if next_arg <= numel(args)
828200.821 s4.8%
351
next = args{next_arg};
828200.691 s4.1%
All other lines  5.988 s35.2%
Totals  17.034 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
imresize>scaleOrSizesubfunction828204.646 s27.3%
iptcheckinputMEX-file828200.431 s2.5%
Self time (built-ins, overhead, etc.)  11.957 s70.2%
Totals  17.034 s100% 
Code Analyzer results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in function49
Non-code lines (comments, blank lines)18
Code lines (lines that can run)31
Code lines that did run16
Code lines that did not run15
Coverage (did run/can run)51.61 %
Function listing
   time   calls  line
311 function [A, map, scale, output_size] = parsePreMethodArgs(args, method_arg_idx, ...
312 first_param_idx)
313 % Parse all the input arguments before the method argument.
314
315 % Keep only the arguments before the method argument.
0.40 82820 316 if ~isempty(method_arg_idx)
0.63 82820 317 args = args(1:method_arg_idx-1);
318 elseif ~isempty(first_param_idx)
319 args = args(1:first_param_idx-1);
320 end
321
322 % There must be at least one input argument before the method argument.
0.44 82820 323 if numel(args) < 1
324 error(message('images:imresize:badSyntaxMissingImage'));
325 end
326
327 % Set default outputs.
0.45 82820 328 map = [];
0.27 82820 329 scale = [];
0.20 82820 330 output_size = [];
331
0.42 82820 332 A = args{1};
2.04 82820 333 iptcheckinput(A, {'numeric', 'logical'}, {'nonsparse', 'nonempty'}, mfilename, 'A', 1);
334
0.47 82820 335 if numel(args) < 2
336 return
337 end
338
0.68 82820 339 next_arg = 2;
1.34 82820 340 if size(args{next_arg},2) == 3
341 % IMRESIZE(X,MAP,...)
342 map = args{next_arg};
343 iptcheckmap(map, mfilename, 'MAP', 2);
344 next_arg = next_arg + 1;
345 end
346
0.48 82820 347 if next_arg > numel(args)
348 return
349 end
350
0.69 82820 351 next = args{next_arg};
352
353 % The next input argument must either be the scale or the output size.
6.15 82820 354 [scale, output_size] = scaleOrSize(next, next_arg);
0.23 82820 355 next_arg = next_arg + 1;
356
0.82 82820 357 if next_arg <= numel(args)
358 error(message('images:imresize:badSyntaxUnrecognizedInput', next_arg));
359 end

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