This is a static copy of a profile reportHome
imresize>parseMethodArg (82820 calls, 11.646 sec)
Generated 05-Nov-2014 07:53:27 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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
406 | [valid_method_names, method_ke... | 82820 | 5.337 s | 45.8% |  |
412 | idx = find(strncmpi(method, va... | 82820 | 1.051 s | 9.0% |  |
410 | if ischar(method) | 82820 | 0.901 s | 7.7% |  |
421 | if strcmp(valid_method_names{i... | 82820 | 0.811 s | 7.0% |  |
408 | antialiasing = true; | 82820 | 0.661 s | 5.7% |  |
All other lines | | | 2.884 s | 24.8% |  |
Totals | | | 11.646 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
imresize>getMethodInfo | subfunction | 82820 | 4.236 s | 36.4% |  |
Self time (built-ins, overhead, etc.) | | | 7.410 s | 63.6% |  |
Totals | | | 11.646 s | 100% | |
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 32 |
Non-code lines (comments, blank lines) | 12 |
Code lines (lines that can run) | 20 |
Code lines that did run | 10 |
Code lines that did not run | 10 |
Coverage (did run/can run) | 50.00 % |
Function listing
time calls line
402 function [kernel, kernel_width, antialiasing] = parseMethodArg(method)
403 % Return the kernel function handle and kernel width corresponding to
404 % the specified method.
405
5.34 82820 406 [valid_method_names, method_kernels, kernel_widths] = getMethodInfo();
407
0.66 82820 408 antialiasing = true;
409
0.90 82820 410 if ischar(method)
411 % Replace iptcheckstrs here as an optimization. -SLE, 31-Oct-2006
1.05 82820 412 idx = find(strncmpi(method, valid_method_names, numel(method)));
413
0.31 82820 414 switch numel(idx)
0.24 82820 415 case 0
416 error(message('images:imresize:unrecognizedMethodString', method));
417
0.22 82820 418 case 1
0.42 82820 419 kernel = method_kernels{idx};
0.38 82820 420 kernel_width = kernel_widths(idx);
0.81 82820 421 if strcmp(valid_method_names{idx}, 'nearest')
422 antialiasing = false;
423 end
424
425 otherwise
426 error(message('images:imresize:ambiguousMethodString', method));
427 end
428
429 else
430 % Cell-array form
431 kernel = method{1};
432 kernel_width = method{2};
433 end
Other subfunctions in this file are not included in this listing.