Changeset 16426 for trunk/Mars
- Timestamp:
- 05/29/13 12:32:04 (11 years ago)
- Location:
- trunk/Mars/mcore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/fits.h
r16424 r16426 477 477 return 0; 478 478 479 const s treamoff shift = Get<streamoff>("THEAP");479 const size_t shift = Get<size_t>("THEAP"); 480 480 return shift <= total_bytes ? 0 : shift - total_bytes; 481 481 } -
trunk/Mars/mcore/zfits.h
r16425 r16426 190 190 const char *src = fTransposedBuffer.data(); 191 191 192 for (auto it=fTable.sortedCols.begin(); it!=fTable.sortedCol d.end(); it++)192 for (auto it=fTable.sortedCols.begin(); it!=fTable.sortedCols.end(); it++) 193 193 { 194 char *buffer = fBuffer.data() + col->offset; // pointer to column (destination buffer)194 char *buffer = fBuffer.data() + it->offset; // pointer to column (destination buffer) 195 195 196 196 switch (it->comp) … … 201 201 for (char *dest=buffer; dest<buffer+thisRoundNumRows*fTable.bytes_per_row; dest+=fTable.bytes_per_row) // row-by-row 202 202 { 203 memcpy(dest, src, col->bytes);203 memcpy(dest, src, it->bytes); 204 204 src += it->bytes; // next column 205 205 } … … 208 208 default: 209 209 // transposed copy 210 for (char *elem=buffer; elem<buffer+ col->bytes; elem+=col->size) // element-by-element (arrays)210 for (char *elem=buffer; elem<buffer+it->bytes; elem+=it->size) // element-by-element (arrays) 211 211 { 212 212 for (char *dest=elem; dest<elem+thisRoundNumRows*fTable.bytes_per_row; dest+=fTable.bytes_per_row) // row-by-row 213 213 { 214 memcpy(dest, src, col->size);214 memcpy(dest, src, it->size); 215 215 src += it->size; // next element 216 216 } … … 291 291 void UncompressBuffer(const uint32_t &catalogCurrentRow, const uint32_t &thisRoundNumRows) 292 292 { 293 char *dest = fTranspose Buffer.data();293 char *dest = fTransposedBuffer.data(); 294 294 295 295 //uncompress column by column 296 296 for (uint32_t i=0; i<fTable.sortedCols.size(); i++) 297 297 { 298 const Column &col = fTable.sortedCols[i];298 const fits::Table::Column &col = fTable.sortedCols[i]; 299 299 if (col.num == 0) 300 300 continue; … … 314 314 { 315 315 case UNCOMPRESSED: 316 const uint32_t offset = UncompressUNCOMPRESSED(dest, src, thisRoundNumRows, col.size, col.num); 317 dest += offset; 316 dest += UncompressUNCOMPRESSED(dest, src, thisRoundNumRows, col.size, col.num); 318 317 break; 319 318 320 319 case SMOOTHMAN: 321 const uint32_t offset = UncompressSMOOTHMAN(reinterpret_cast<int16_t*>(dest), src, thisRoundNumRows, col.size, col.num); 322 dest += offset; 320 dest += UncompressSMOOTHMAN(reinterpret_cast<int16_t*>(dest), src, thisRoundNumRows, col.size, col.num); 323 321 break; 324 322
Note:
See TracChangeset
for help on using the changeset viewer.