Changeset 16809


Ignore:
Timestamp:
06/12/13 10:30:10 (11 years ago)
Author:
lyard
Message:
Added tile num rows tag
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/fitsCompressor.cc

    r16806 r16809  
    459459{
    460460  char     id[4];
     461  uint32_t numRows;
    461462  uint64_t size;
    462   TileHeader()
     463  TileHeader(uint32_t nRows=0, uint64_t s=0)
    463464  {
    464465      id[0]='T';
     
    466467      id[2]='L';
    467468      id[3]='E';
    468       size=0;
     469      numRows=nRows;
     470      size=s;
    469471  };
    470472} __attribute__((__packed__)) TileHeader;
     473
     474typedef struct BlockHeader
     475{
     476    uint64_t size;
     477    char ordering;
     478    unsigned char numProcs;
     479    uint16_t procs[];
     480} __attribute__((__packed__)) BlockHeader;
    471481
    472482template<>
     
    12851295        _catalog[currentCatalogRow][i].first = compressedOffset - _catalog[currentCatalogRow][i].second;
    12861296    }
    1287     memcpy(&(_compressedBuffer[threadIndex][4]), &compressedOffset, sizeof(uint64_t));
     1297    TileHeader tHead(thisRoundNumRows, compressedOffset);
     1298//    tHead.numRows = thisRoundNumRows;
     1299//    tHead.size = compressedOffset;
     1300    memcpy(_compressedBuffer[threadIndex], &tHead, sizeof(TileHeader));
    12881301    return compressedOffset;
    12891302}
     
    19391952
    19401953    //close reconstruction input and output
     1954//    Do NOT close the verify file, otherwise data cannot be flushed to copy file
    19411955//    verifyFile.close();
    19421956    reconstructedFile.close();
Note: See TracChangeset for help on using the changeset viewer.