This is a static copy of a profile reportHome
setNewFlag>applyFlag (1 call, 0.044 sec)
Generated 05-Aug-2011 13:00:38 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 | 1 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
211 | f = find(flagRx); | 1 | 0.011 s | 25.0% |  |
205 | flags.bit.fast = uint32(zero... | 1 | 0.011 s | 25.0% |  |
201 | flagRx = uint32(repmat(flagR... | 1 | 0.011 s | 25.0% |  |
189 | flagRegTemp = mean(flagRegTemp... | 1 | 0.011 s | 25.0% |  |
214 | return; | 1 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.044 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
mean | function | 2 | 0.011 s | 25.0% |  |
repmat | function | 1 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.033 s | 75.0% |  |
Totals | | | 0.044 s | 100% | |
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 66 |
Non-code lines (comments, blank lines) | 14 |
Code lines (lines that can run) | 52 |
Code lines that did run | 28 |
Code lines that did not run | 24 |
Coverage (did run/can run) | 53.85 % |
Function listing
time calls line
149 function flags = applyFlag(d, flagVec, bitNum)
150
1 151 l = length(flagVec);
152
1 153 switch l
1 154 case size(d.antenna0.receiver.data,1)
1 155 flagRegTemp = [];
1 156 flagServTemp = [];
1 157 flagRxTemp = flagVec;
158
159 case length(d.array.frame.features)
160 flagRegTemp = flagVec;
161 flagServTemp = [];
162 flagRxTemp =[];
163
164 case length(d.antenna0.thermal.ccTemperatureLoad)
165 flagRegTemp = [];
166 flagServTemp = flagVec;
167 flagRxTemp = [];
168 end
169
1 170 if(~isempty(flagRegTemp))
171 flagServTemp = repmat(flagRegTemp, [1 5]);
172 flagServTemp = flagServTemp';
173 flagServTemp = flagServTemp(:);
174
175 flagRxTemp = repmat(flagRegTemp, [1 100]);
176 flagRxTemp = flagRxTemp';
177 flagRxTemp = flagRxTemp(:);
178
1 179 elseif(~isempty(flagServTemp))
180 flagRegTemp = reshape(flagServTemp, [5, length(flagServTemp)/5]);
181 flagRegTemp = mean(flagRegTemp) == 1;
182 flagRegTemp = flagRegTemp';
183
184 flagRxTemp = repmat(flagServTemp, [1 20]);
185 flagRxTemp = flagRxTemp';
186 flagRxTemp = flagRxTemp(:);
1 187 elseif(~isempty(flagRxTemp))
1 188 flagRegTemp = reshape(flagRxTemp, [100, length(flagRxTemp)/100]);
0.01 1 189 flagRegTemp = mean(flagRegTemp) == 1;
1 190 flagRegTemp = flagRegTemp';
191
1 192 flagServTemp = reshape(flagRxTemp, [20, length(flagRxTemp)/20]);
1 193 flagServTemp = mean(flagServTemp) == 1;
1 194 flagServTemp = flagServTemp';
195 else
196 error('No flags passed');
197 end
198
1 199 flagReg = uint32(flagRegTemp);
1 200 flagServ = uint32(flagServTemp);
0.01 1 201 flagRx = uint32(repmat(flagRxTemp, [1 3]));
202
1 203 flags.bit.slow = uint32(zeros(size(flagReg)));
1 204 flags.bit.medium = uint32(zeros(size(flagServ)));
0.01 1 205 flags.bit.fast = uint32(zeros(size(flagRx)));
206
1 207 f = find(flagReg);
1 208 flags.bit.slow(f) = bitset(flags.bit.slow(f), bitNum);
1 209 f = find(flagServ);
1 210 flags.bit.medium(f) = bitset(flags.bit.medium(f), bitNum);
0.01 1 211 f = find(flagRx);
1 212 flags.bit.fast(f) = bitset(flags.bit.fast(f), bitNum);
213
1 214 return;
Other subfunctions in this file are not included in this listing.