This is a static copy of a profile report

Home

ml_shift (1216653 calls, 304.151 sec)
Generated 05-Nov-2014 07:53:54 using cpu time.
function in file /usr0/home/jenkins/workspace/cellorganizer-demo3D11-glnx64/utilities/2D/tztoolbox/ml_shift.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
ml_tracecontour>ml_getnbidxsubfunction1216653
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
41
y = circshift(x,offset);
1216653267.380 s87.9%
38
offset = [offset offset];
12166539.423 s3.1%
37
if length(offset)==1
12166536.679 s2.2%
33
if nargin < 2
12166534.056 s1.3%
39
end
12166533.635 s1.2%
All other lines  12.978 s4.3%
Totals  304.151 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
circshiftfunction1216653252.830 s83.1%
Self time (built-ins, overhead, etc.)  51.321 s16.9%
Totals  304.151 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)34
Code lines (lines that can run)7
Code lines that did run5
Code lines that did not run2
Coverage (did run/can run)71.43 %
Function listing
   time   calls  line
1 function y = ml_shift(x,offset)
2 %ML_SHIFT Circular shift of a matrix.
3 % Y = ML_SHIFT(X,OFFSET) return a circularly shifted matrix of X. OFFSET is a
4 % scalar of 1x2 vector. If it is a scalar, both dimensions will be shifted by
5 % OFFSET. If it is a 1x2 vector, OFFSET(1) is for rows and OFFSET(2) is for
6 % columns. The direction is left and down.
7 %
8 % See also
9
10 % 10-Sep-2006 Initial write T. Zhao
11 % Copyright (c) 2006 Murphy Lab
12 % Carnegie Mellon University
13 %
14 % This program is free software; you can redistribute it and/or modify
15 % it under the terms of the GNU General Public License as published
16 % by the Free Software Foundation; either version 2 of the License,
17 % or (at your option) any later version.
18 %
19 % This program is distributed in the hope that it will be useful, but
20 % WITHOUT ANY WARRANTY; without even the implied warranty of
21 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 % General Public License for more details.
23 %
24 % You should have received a copy of the GNU General Public License
25 % along with this program; if not, write to the Free Software
26 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27 % 02110-1301, USA.
28 %
29 % For additional information visit http://murphylab.web.cmu.edu or
30 % send email to murphy@cmu.edu
31
32
4.06 1216653 33 if nargin < 2
34 error('Exactly 2 arguments are required');
35 end
36
6.68 1216653 37 if length(offset)==1
9.42 1216653 38 offset = [offset offset];
3.64 1216653 39 end
40
267.38 1216653 41 y = circshift(x,offset);