This is a static copy of a profile report

Home

maketform>composite (1721 calls, 0.561 sec)
Generated 05-Nov-2014 07:53:04 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/maketform.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
maketformfunction1721
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
514
t = assigntform(tdata(N).ndims...
17210.140 s25.0%
475
if ~istform(tdata)
17210.130 s23.2%
493
if any(ndims_in(1:N-1) ~= ndim...
17210.060 s10.7%
498
if any(cellfun('isempty',{tdat...
17210.040 s7.1%
491
ndims_in =  [tdata.ndims_in];
17210.030 s5.4%
All other lines  0.160 s28.6%
Totals  0.561 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
images/private/istformfunction17210.090 s16.1%
maketform>assigntformsubfunction17210.070 s12.5%
Self time (built-ins, overhead, etc.)  0.401 s71.4%
Totals  0.561 s100% 
Code Analyzer results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in function59
Non-code lines (comments, blank lines)15
Code lines (lines that can run)44
Code lines that did run22
Code lines that did not run22
Coverage (did run/can run)50.00 %
Function listing
   time   calls  line
457 function t = composite( varargin )
458
459 % Construct COMPOSITE transformation structure.
460
461 % Create TDATA as a TFORM structure array.
0.02 1721 462 if nargin == 0
463 error(message('images:maketform:tooFewTformStructs'))
1721 464 elseif nargin == 1
0.02 1721 465 if length(varargin{1}) == 1
466 % One TFORM input, just copy to t
467 t = varargin{1};
468 if ~istform(t)
469 error(message('images:maketform:invalidTformStruct'))
470 end
471 return;
1721 472 else
473 % An array of TFORMs
1721 474 tdata = varargin{1};
0.13 1721 475 if ~istform(tdata)
476 error(message('images:maketform:invalidTformStructArray'))
477 end
1721 478 end
479 else
480 % A list of TFORMs
481 for k = 1:nargin
482 if ~istform(varargin{k}) || length(varargin{k}) ~= 1
483 error(message('images:maketform:invalidTformsInArray'))
484 end
485 end
486 tdata = [varargin{:}];
487 end
488
489 % Check for consistency of dimensions
1721 490 N = length(tdata);
0.03 1721 491 ndims_in = [tdata.ndims_in];
1721 492 ndims_out = [tdata.ndims_out];
0.06 1721 493 if any(ndims_in(1:N-1) ~= ndims_out(2:N))
494 error(message('images:maketform:tFormsDoNotHaveSameDimension'))
495 end
496
497 % Check existence of forward and inverse function handles
0.04 1721 498 if any(cellfun('isempty',{tdata.forward_fcn}))
499 forward_fcn = [];
0.01 1721 500 else
0.02 1721 501 forward_fcn = @fwd_composite;
0.01 1721 502 end
503
0.01 1721 504 if any(cellfun('isempty',{tdata.inverse_fcn}))
505 inverse_fcn = [];
0.01 1721 506 else
0.01 1721 507 inverse_fcn = @inv_composite;
0.01 1721 508 end
509
0.01 1721 510 if (isempty(forward_fcn) && isempty(inverse_fcn))
511 error(message('images:maketform:invalidForwardOrInverseFunction'))
512 end
513
0.14 1721 514 t = assigntform(tdata(N).ndims_in, tdata(1).ndims_out, ...
1721 515 forward_fcn, inverse_fcn, tdata);

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