This is a static copy of a profile reportHome
setNewFlag>applyFlag2 (8 calls, 0.448 sec)
Generated 05-Aug-2011 13:00:59 using cpu time.
subfunction in file /home/LeechJ/cbass_analysis/reduc/flag/setNewFlag.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
setNewFlag | function | 8 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
240 | flagRx(:,m) = flagRxTemp; | 24 | 0.120 s | 26.8% |  |
231 | flagRegTemp = mean(flagRegTemp... | 24 | 0.109 s | 24.4% |  |
246 | flagRx = uint32(flagRx); | 8 | 0.066 s | 14.6% |  |
257 | flags.bit.fast(f) = bitset(fla... | 8 | 0.033 s | 7.3% |  |
228 | flagRxTemp = flagArray(:,m); | 24 | 0.033 s | 7.3% |  |
All other lines | | | 0.087 s | 19.5% |  |
Totals | | | 0.448 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
mean | function | 48 | 0.131 s | 29.3% |  |
Self time (built-ins, overhead, etc.) | | | 0.317 s | 70.7% |  |
Totals | | | 0.448 s | 100% | |
Code Analyzer results
Line number | Message |
220 | Input argument 'd' might be unused, although a later one is used. Consider replacing it by ~. |
226 | The value assigned to variable 'flagRegTemp' might be unused. |
227 | The value assigned to variable 'flagServTemp' might be unused. |
238 | The variable 'flagReg' appears to change size on every loop iteration. Consider preallocating for speed. |
239 | The variable 'flagServ' appears to change size on every loop iteration. Consider preallocating for speed. |
240 | The variable 'flagRx' appears to change size on every loop iteration. Consider preallocating for speed. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 40 |
Non-code lines (comments, blank lines) | 13 |
Code lines (lines that can run) | 27 |
Code lines that did run | 27 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
220 function flags = applyFlag2(d, flagArray, bitNum)
221
222
223
8 224 for m=1:size(flagArray,2)
225
24 226 flagRegTemp = [];
24 227 flagServTemp = [];
0.03 24 228 flagRxTemp = flagArray(:,m);
229
24 230 flagRegTemp = reshape(flagRxTemp, [100, length(flagRxTemp)/100]);
0.11 24 231 flagRegTemp = mean(flagRegTemp) == 1;
24 232 flagRegTemp = flagRegTemp';
233
24 234 flagServTemp = reshape(flagRxTemp, [20, length(flagRxTemp)/20]);
0.02 24 235 flagServTemp = mean(flagServTemp) == 1;
24 236 flagServTemp = flagServTemp';
237
24 238 flagReg(:,m) = flagRegTemp;
24 239 flagServ(:,m) = flagServTemp;
0.12 24 240 flagRx(:,m) = flagRxTemp;
24 241 end
242
243
8 244 flagReg = uint32(sum(flagReg,2) > 0);
0.01 8 245 flagServ = uint32(sum(flagServ,2) > 0);
0.07 8 246 flagRx = uint32(flagRx);
247
8 248 flags.bit.slow = uint32(zeros(size(flagReg)));
8 249 flags.bit.medium = uint32(zeros(size(flagServ)));
0.02 8 250 flags.bit.fast = uint32(zeros(size(flagRx)));
251
8 252 f = find(flagReg);
8 253 flags.bit.slow(f) = bitset(flags.bit.slow(f), bitNum);
8 254 f = find(flagServ);
8 255 flags.bit.medium(f) = bitset(flags.bit.medium(f), bitNum);
0.02 8 256 f = find(flagRx);
0.03 8 257 flags.bit.fast(f) = bitset(flags.bit.fast(f), bitNum);
258
8 259 return;
Other subfunctions in this file are not included in this listing.