This is a static copy of a profile reportHome
region_seg>sussman (234500 calls, 34274.138 sec)
Generated 05-Nov-2014 07:52:53 using cpu time.
subfunction in file /usr0/home/jenkins/workspace/cellorganizer-demo3D11-glnx64/utilities/preprocessing/3D/ashariff/region_seg.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
region_seg | function | 234500 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
282 | dD(D_pos_ind) = sqrt(max(a_p(D... | 234500 | 10134.738 s | 29.6% |  |
262 | c = D - shiftD(D); % backward | 234500 | 3686.008 s | 10.8% |  |
263 | d = shiftU(D) - D; % forward | 234500 | 3668.354 s | 10.7% |  |
287 | D = D - dt .* sussman_sign(D) ... | 234500 | 3429.644 s | 10.0% |  |
260 | a = D - shiftR(D); % backward | 234500 | 1373.370 s | 4.0% |  |
All other lines | | | 11982.024 s | 35.0% |  |
Totals | | | 34274.138 s | 100% | |
Children (called functions)
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 30 |
Non-code lines (comments, blank lines) | 8 |
Code lines (lines that can run) | 22 |
Code lines that did run | 22 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
258 function D = sussman(D, dt)
259 % forward/backward differences
1373.37 234500 260 a = D - shiftR(D); % backward
1360.09 234500 261 b = shiftL(D) - D; % forward
3686.01 234500 262 c = D - shiftD(D); % backward
3668.35 234500 263 d = shiftU(D) - D; % forward
264
1.88 234500 265 a_p = a; a_n = a; % a+ and a-
0.96 234500 266 b_p = b; b_n = b;
0.81 234500 267 c_p = c; c_n = c;
1.28 234500 268 d_p = d; d_n = d;
269
967.41 234500 270 a_p(a < 0) = 0;
948.01 234500 271 a_n(a > 0) = 0;
973.81 234500 272 b_p(b < 0) = 0;
954.88 234500 273 b_n(b > 0) = 0;
1016.50 234500 274 c_p(c < 0) = 0;
993.45 234500 275 c_n(c > 0) = 0;
1021.43 234500 276 d_p(d < 0) = 0;
996.77 234500 277 d_n(d > 0) = 0;
278
420.53 234500 279 dD = zeros(size(D));
618.15 234500 280 D_neg_ind = find(D < 0);
949.31 234500 281 D_pos_ind = find(D > 0);
10134.74 234500 282 dD(D_pos_ind) = sqrt(max(a_p(D_pos_ind).^2, b_n(D_pos_ind).^2) ...
283 + max(c_p(D_pos_ind).^2, d_n(D_pos_ind).^2)) - 1;
738.53 234500 284 dD(D_neg_ind) = sqrt(max(a_n(D_neg_ind).^2, b_p(D_neg_ind).^2) ...
285 + max(c_n(D_neg_ind).^2, d_p(D_neg_ind).^2)) - 1;
286
3429.64 234500 287 D = D - dt .* sussman_sign(D) .* dD;
Other subfunctions in this file are not included in this listing.