This is a static copy of a profile report

Home

imwrite>validateSizes (3 calls, 0.010 sec)
Generated 14-Nov-2016 07:47:22 using cpu time.
subfunction in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/imagesci/imwrite.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imwritefunction3
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
607
elementSize = 1;
30.010 s100.0%
630
elseif ((numel(data) * element...
30 s0%
626
if (any(size(data) > max32)...
30 s0%
624
max32 = double(intmax('uint32'...
30 s0%
605
case {'uint8', 'int8', 'logica...
30 s0%
All other lines  0 s0%
Totals  0.010 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
intmaxfunction30 s0%
Self time (built-ins, overhead, etc.)  0.010 s100.0%
Totals  0.010 s100% 
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function34
Non-code lines (comments, blank lines)18
Code lines (lines that can run)16
Code lines that did run6
Code lines that did not run10
Coverage (did run/can run)37.50 %
Function listing
time 
calls 
 line
 601 
function validateSizes(data)
 602 

 603 
% How many bytes does each element occupy in memory?
      3 
 604 
switch (class(data)) 
      3 
 605 
case {'uint8', 'int8', 'logical'} 
 606 

  0.01 
      3 
 607 
    elementSize = 1; 
 608 
    
 609 
case {'uint16', 'int16'}
 610 

 611 
    elementSize = 2;
 612 
    
 613 
case {'uint32', 'int32', 'single'}
 614 

 615 
    elementSize = 4;
 616 
    
 617 
case {'uint64', 'int64', 'double'}
 618 
    
 619 
    elementSize = 8;
 620 
    
 621 
end
 622 

 623 
% Validate that the dataset/image will fit within 32-bit offsets.
      3 
 624 
max32 = double(intmax('uint32')); 
 625 

      3 
 626 
if (any(size(data) > max32)) 
 627 
    
 628 
    error(message('MATLAB:imagesci:imwrite:sideTooLong'))
 629 
    
      3 
 630 
elseif ((numel(data) * elementSize) > max32) 
 631 
    
 632 
    error(message('MATLAB:imagesci:imwrite:tooMuchData'))
 633 
    
 634 
end

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