This is a static copy of a profile report

Home

imresize>resizeAlongDim (165640 calls, 19.677 sec)
Generated 05-Nov-2014 07:53:48 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
imresizefunction165640
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
742
out = resizeAlongDimUsingNeare...
828205.708 s29.0%
741
if isPureNearestNeighborComput...
1656404.797 s24.4%
762
out = imresizemex(in, weights'...
828204.456 s22.6%
749
size_in((end + 1) : dim) = 1;
828200.581 s3.0%
751
if (ndims(in) > 3)
828200.481 s2.4%
All other lines  3.655 s18.6%
Totals  19.677 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...ze>resizeAlongDimUsingNearestNeighborsubfunction828204.626 s23.5%
...size>isPureNearestNeighborComputationsubfunction1656402.734 s13.9%
images/private/imresizemexMEX-file828202.614 s13.3%
Self time (built-ins, overhead, etc.)  9.703 s49.3%
Totals  19.677 s100% 
Code Analyzer results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in function37
Non-code lines (comments, blank lines)20
Code lines (lines that can run)17
Code lines that did run9
Code lines that did not run8
Coverage (did run/can run)52.94 %
Function listing
   time   calls  line
733 function out = resizeAlongDim(in, dim, weights, indices)
734 % Resize along a specified dimension
735 %
736 % in - input array to be resized
737 % dim - dimension along which to resize
738 % weights - weight matrix; row k is weights for k-th output pixel
739 % indices - indices matrix; row k is indices for k-th output pixel
740
4.80 165640 741 if isPureNearestNeighborComputation(weights)
5.71 82820 742 out = resizeAlongDimUsingNearestNeighbor(in, dim, indices);
0.26 82820 743 return
744 end
745
0.24 82820 746 out_length = size(weights, 1);
747
0.41 82820 748 size_in = size(in);
0.58 82820 749 size_in((end + 1) : dim) = 1;
750
0.48 82820 751 if (ndims(in) > 3)
752 % Reshape in to be a three-dimensional array. The size of this
753 % three-dimensional array is the variable pseudo_size_in below.
754 %
755 % Final output will be consistent with the original input.
756 pseudo_size_in = [size_in(1:2) prod(size_in(3:end))];
757 in = reshape(in, pseudo_size_in);
758 end
759
760 % The 'out' will be uint8 if 'in' is logical
761 % Otherwise 'out' datatype will be same as 'in' datatype
4.46 82820 762 out = imresizemex(in, weights', indices', dim);
763
0.40 82820 764 if (ndims(in) > 3)
765 % Restoring final output to expected size
766 size_out = size_in;
767 size_out(dim) = out_length;
768 out = reshape(out, size_out);
769 end

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