This is a static copy of a profile report

Home

tformarray>CheckDimsAndSizes (1721 calls, 1.212 sec)
Generated 05-Nov-2014 07:52:38 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/tformarray.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
tformarrayfunction1721
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
598
if length(unique(tdims_A)) ~= ...
17210.381 s31.4%
602
if length(unique(tdims_B)) ~= ...
17210.371 s30.6%
591
if ~IsFinitePositiveIntegerRow...
17210.110 s9.1%
587
if ~IsFinitePositiveIntegerRow...
17210.110 s9.1%
657
if ~IsFinitePositiveIntegerRow...
17210.070 s5.8%
All other lines  0.170 s14.0%
Totals  1.212 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
uniquefunction34420.701 s57.9%
...rray>IsFinitePositiveIntegerRowVectorsubfunction51630.190 s15.7%
images/private/istformfunction17210.040 s3.3%
Self time (built-ins, overhead, etc.)  0.280 s23.1%
Totals  1.212 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function81
Non-code lines (comments, blank lines)28
Code lines (lines that can run)53
Code lines that did run16
Code lines that did not run37
Coverage (did run/can run)30.19 %
Function listing
   time   calls  line
584 function tsize_B = CheckDimsAndSizes( tdims_A, tdims_B, tsize_B, tmap_B, T )
585
586 % Check dimensions
0.11 1721 587 if ~IsFinitePositiveIntegerRowVector( tdims_A )
588 error(message('images:tformarray:invalidTDIMS_A'));
589 end
590
0.11 1721 591 if ~IsFinitePositiveIntegerRowVector( tdims_B )
592 error(message('images:tformarray:invalidTDIMS_B'));
593 end
594
1721 595 P = length(tdims_A);
0.01 1721 596 N = length(tdims_B);
597
0.38 1721 598 if length(unique(tdims_A)) ~= P
599 error(message('images:tformarray:nonUniqueTDIMS_A'));
600 end
601
0.37 1721 602 if length(unique(tdims_B)) ~= N
603 error(message('images:tformarray:nonUniqueTDIMS_B'));
604 end
605
606 % If tmap_B is supplied, ignore the input value of tsize_B and
607 % construct tsize_B from tmap_B instead. Allow for the possibility
608 % that the last dimension of tmap_B is a singleton by copying no
609 % more than N values from size(tmap_B).
610
1721 611 if isempty(tmap_B)
1721 612 L = N;
613 else
614 if ~isempty(tsize_B)
615 warning(message('images:tformarray:ignoringTSIZE_B'))
616
617 end
618
619 if ~isa(tmap_B,'double') || ~isreal(tmap_B) || issparse(tmap_B) || ...
620 any(isinf(tmap_B(:)))
621 error(message('images:tformarray:invalidTMAP_B'))
622 end
623
624 L = size(tmap_B,N+1);
625
626 if isempty(T) && L ~= P
627 error(message('images:tformarray:invalidSizeTMAP_B'))
628 end
629
630 if ndims(tmap_B) ~= PredictNDimsG(N,L)
631 error(message('images:tformarray:invalidDimsTMAP_B'))
632 end
633
634 size_G = size(tmap_B);
635 tsize_B(1:N) = size_G(1:N);
636 end
637
638 % Check T
1721 639 if ~isempty(T)
0.05 1721 640 if ~istform(T)
641 error(message('images:tformarray:invalidTFORMStruct'));
642 end
643
0.01 1721 644 if length(T) > 1
645 error(message('images:tformarray:multipleTFORMStructs'));
646 end
647
1721 648 if T.ndims_in ~= P
649 error(message('images:tformarray:dimsMismatchA'));
650 end
651
0.02 1721 652 if T.ndims_out ~= L
653 error(message('images:tformarray:dimsMismatchB'));
654 end
1721 655 end
656
0.07 1721 657 if ~IsFinitePositiveIntegerRowVector( tsize_B )
658 error(message('images:tformarray:invalidTSIZE_B'));
659 end
660
661 % tsize_B and tdims_B must have the same length.
0.02 1721 662 if length(tsize_B) ~= N
663 error(message('images:tformarray:lengthMismatchB'));
664 end

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