- Timestamp:
- 06/01/13 19:52:12 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/factfits.h
r16502 r16560 58 58 int16_t *data = reinterpret_cast<int16_t*>(fBufferRow.data() + offset + fOffsetData); 59 59 60 /* 60 61 for (uint32_t i=0; i<1440*1024; i+=1024, startCell++) 61 62 { 63 if (*startCell < 0) 64 continue; 65 62 66 for (uint32_t j=0; j<fNumRoi; j++, data++) 67 *data += fOffsetCalibration[i + (*startCell+j)%1024]; 68 } 69 */ 70 71 // This version is faster because the compilers optimization 72 // is not biased by the evaluation of %1024 73 for (int ch=0; ch<1440; ch++) 74 { 75 if (startCell[ch]<0) 63 76 { 64 if ((*startCell) < 0) continue;65 *data += fOffsetCalibration[i + (*startCell+j)%1024];77 data += fNumRoi; 78 continue; 66 79 } 80 81 const int16_t *off = fOffsetCalibration.data() + ch*1024; 82 83 const int16_t *cal = off+startCell[ch]; 84 const int16_t *end = data+fNumRoi; 85 86 if (startCell[ch]+fNumRoi>1024) 87 { 88 while (cal<off+1024) 89 *data++ += *cal++; 90 91 cal = off; 92 } 93 while (data<end) 94 *data++ += *cal++; 67 95 } 68 96 }
Note:
See TracChangeset
for help on using the changeset viewer.