FACT++  1.0
void zfits::AllocateBuffers ( )
inlineprivate

Definition at line 157 of file zfits.h.

References BlockHeader(), fits::Table::bytes_per_row, fNumRowsPerTile, fits::fTable, fits::Table::num_cols, and TileHeader().

Referenced by InitCompressionReading().

158  {
159  uint32_t buffer_size = fTable.bytes_per_row*fNumRowsPerTile;
160  uint32_t compressed_buffer_size = fTable.bytes_per_row*fNumRowsPerTile +
161  //use a bit more memory for block headers. 256 char coding the compression sequence max.
162  fTable.num_cols*(sizeof(FITS::BlockHeader)+256) +
163  //a bit more for the tile headers
164  sizeof(FITS::TileHeader) +
165  //and a bit more for checksuming
166  8;
167 
168  if (buffer_size % 4 != 0)
169  buffer_size += 4 - (buffer_size%4);
170 
171  if (compressed_buffer_size % 4 != 0)
172  compressed_buffer_size += 4 - (compressed_buffer_size%4);
173 
174  fBuffer.resize(buffer_size);
175 
176  fTransposedBuffer.resize(buffer_size);
177  fCompressedBuffer.resize(compressed_buffer_size);
178  }
size_t fNumRowsPerTile
Number of rows per compressed tile.
Definition: zfits.h:143
size_t bytes_per_row
Definition: fits.h:96
std::vector< char > fTransposedBuffer
intermediate buffer to transpose the rows
Definition: zfits.h:138
size_t num_cols
Definition: fits.h:98
BlockHeader(uint64_t s=0, char o=kOrderByRow, unsigned char n=1)
Definition: FITS.h:76
Table fTable
Definition: fits.h:502
std::vector< char > fCompressedBuffer
compressed rows
Definition: zfits.h:139
std::vector< char > fBuffer
store the uncompressed rows
Definition: zfits.h:137
TileHeader()
Definition: FITS.h:75

+ Here is the call graph for this function:

+ Here is the caller graph for this function: