This is a static copy of a profile report

Home

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 NameFunction TypeCalls
setNewFlagfunction8
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
240
flagRx(:,m)   = flagRxTemp;
240.120 s26.8%
231
flagRegTemp = mean(flagRegTemp...
240.109 s24.4%
246
flagRx   = uint32(flagRx);
80.066 s14.6%
257
flags.bit.fast(f) = bitset(fla...
80.033 s7.3%
228
flagRxTemp   = flagArray(:,m);
240.033 s7.3%
All other lines  0.087 s19.5%
Totals  0.448 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
meanfunction480.131 s29.3%
Self time (built-ins, overhead, etc.)  0.317 s70.7%
Totals  0.448 s100% 
Code Analyzer results
Line numberMessage
220Input argument 'd' might be unused, although a later one is used. Consider replacing it by ~.
226The value assigned to variable 'flagRegTemp' might be unused.
227The value assigned to variable 'flagServTemp' might be unused.
238The variable 'flagReg' appears to change size on every loop iteration. Consider preallocating for speed.
239The variable 'flagServ' appears to change size on every loop iteration. Consider preallocating for speed.
240The variable 'flagRx' appears to change size on every loop iteration. Consider preallocating for speed.
Coverage results
[ Show coverage for parent directory ]
Total lines in function40
Non-code lines (comments, blank lines)13
Code lines (lines that can run)27
Code lines that did run27
Code lines that did not run0
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.