This is a static copy of a profile report

Home

imwrite>validateSizes (40 calls, 0.022 sec)
Generated 05-Aug-2011 13:03:43 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/imagesci/imwrite.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imwritefunction40
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
626
elementSize = 1;
400.022 s100.0%
655
elseif ((numel(data) * element...
400 s0%
650
if (any(size(data) > max32)...
400 s0%
648
max32 = double(intmax('uint32'...
400 s0%
624
case {'uint8', 'int8', 'logica...
400 s0%
All other lines  0 s0%
Totals  0.022 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
intmaxfunction400 s0%
Self time (built-ins, overhead, etc.)  0.022 s100.0%
Totals  0.022 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function41
Non-code lines (comments, blank lines)23
Code lines (lines that can run)18
Code lines that did run6
Code lines that did not run12
Coverage (did run/can run)33.33 %
Function listing
   time   calls  line
620 function validateSizes(data)
621
622 % How many bytes does each element occupy in memory?
40 623 switch (class(data))
40 624 case {'uint8', 'int8', 'logical'}
625
0.02 40 626 elementSize = 1;
627
628 case {'uint16', 'int16'}
629
630 elementSize = 2;
631
632 case {'uint32', 'int32', 'single'}
633
634 elementSize = 4;
635
636 case {'uint64', 'int64', 'double'}
637
638 elementSize = 8;
639
640 otherwise
641
642 error('MATLAB:imwrite:unsupportedDatatype', ...
643 'Unsupported image datatype ''%s''.', class(data))
644
645 end
646
647 % Validate that the dataset/image will fit within 32-bit offsets.
40 648 max32 = double(intmax('uint32'));
649
40 650 if (any(size(data) > max32))
651
652 error('MATLAB:imwrite:sideTooLong', ...
653 'Images must have fewer than 2^32 - 1 elements on a side.')
654
40 655 elseif ((numel(data) * elementSize) > max32)
656
657 error('MATLAB:imwrite:tooMuchData', ...
658 'Images must contain fewer than 2^32 - 1 bytes of data.')
659
660 end

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